WordPress.org

Ready to get started?Download WordPress

Forums

CampTix Event Ticketing
[resolved] Give access to other user roles? (6 posts)

  1. starent1
    Member
    Posted 1 year ago #

    Is it possible to give other user roles access to the plugin? I don't want to have to give Administrator access to the people who will be taking care of the event.

    Thanks!

    http://wordpress.org/extend/plugins/camptix/

  2. Konstantin Kovshenin
    Member
    Plugin Author

    Posted 1 year ago #

    Hey there! Not with a UI, but sure, you can do that by filtering camptix_capabilities with a plugin. You can learn more from the code right here: https://github.com/Automattic/camptix/blob/master/camptix.php#L92

    Hope that helps!

  3. starent1
    Member
    Posted 1 year ago #

    Ok, so just to clarify-- If I use Capability Manager plugin, and add "camptix_capabilities" to a user role that I want to have access to it, that's all that's required? ie. I'm hoping to just have an account with "Read" access, but can also manage tickets.

    Thanks,

  4. Konstantin Kovshenin
    Member
    Plugin Author

    Posted 1 year ago #

    No, "camptix_capabilities" is not a cap or role, it's a filter name. You have to filter it with a plugin and supply your own capabilities array.

  5. starent1
    Member
    Posted 1 year ago #

    Thanks for the quick reply!

    Any chance you could break down this procedure for me, or point me to some instructions? Haven't had the need to deal with this type of thing, but is very important for our needs.

    I suppose I could create a new capability, and change all the manage_options items in your code to it, but that doesn't seem like an ideal solution, and would break if plugin is updated.

  6. Konstantin Kovshenin
    Member
    Plugin Author

    Posted 1 year ago #

    Either that, or you can do the same in a different plugin with a filter:

    function my_camptix_caps( $caps ) {
        $caps['manage_tickets'] = 'my_custom_cap';
        return $caps;
    }
    add_filter( 'camptix_capabilities', 'my_camptix_caps' );

    Hope that helps!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.