Home Forums Event Espresso Premium Manually create category restriction to Roles?

Manually create category restriction to Roles?

Posted: March 15, 2013 at 11:11 am

Gerald Russell

March 15, 2013 at 11:11 am

From the looking around I’ve done, it looks like the Role Manager Pro does not have the ability to limit a role’s ability to create events in other categories.

Use case — I have a church with different ministries, each creating their own events, and ministries have sub ministries.

I create a Category for each Ministry, sub-ministries get sub categories.

Role scoper allows restricting the role so that it can only post to its category and I can make a Ministry admin that can post to the top level category, as well as post/edit the sub categories.

Ok – so each ministry page also has a calendar, powered by EE — and this is incredible because I use EE’s categories – and so each ministry’s page just shows events in its EE category — same idea but Role Scoper (as mentioned in a different forum post) does not tunnel into the EE calendar categories.

The QUESTION then is — can you suggest a way that I may create some kind of Hook or where I could look to modify the code?

Or could each “location” be work-arounded so that location becomes my “category” If that much works, what about sub-categories? Do locations have sub categories/ sub-locations?

I’m hoping I can just use something like the

global $wp_roles;

// add a new role, same arguments as add_role()
$wp_roles->add_role( $role, $display_name, $capabilities )

Or any suggestions on how I could get Role Scoper to manage EE categories?

I know as a last ditch workaround I can just not use calendars and do everything via posts/custom post types and just show events as lists… but the calendars are sexy 🙂

Chris Reynolds

  • Support Staff

March 18, 2013 at 2:11 pm

Hi Gerald —

What you’re describing would be a great feature request but it’s not possible right now because there is no role or capability associated with creating categories. Basically, in the core plugin, the creating a category function would need to be wrapped in a if ( current_user_can('create_event_espresso_category') check, and that capability would need to be added to a role (either admin or one of the roles in our Roles & Permissions add-on or both).

Gerald Russell

March 18, 2013 at 2:44 pm

Thanks for the reply! It would get pretty hairy I think because I’ve got something like 47 different categories!

Ultimately, it looks like we may use EE for our big events that need ticket scanning, and a different plugin which is already controlled via Role Scoper for non-major and non-ticketed events because the events & event categories for the alternative calendaring plugin are using Custom Post Types, so I can do all the category assigning / restricting from within Role Scoper.

The other nice thing about how role scoper works is that the user only sees the categories she has access to, very user friendly with so many categories going on!

Chris Reynolds

  • Support Staff

March 18, 2013 at 3:06 pm

It wouldn’t matter how many categories you have, but it would need to be added to the core plugin, and that isn’t something we’re looking to add right now. Maybe after the next major version is finished we can come back to this idea as it would definitely make things relating to our Roles & Permissions plugin a lot better.

The support post ‘Manually create category restriction to Roles?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Chris Reynolds 6 years, 8 months ago ago

Topic Tags


This topic is: not resolved
Do NOT follow this link or you will be banned from the site!