Support

Home Forums Event Espresso Premium Admin privileges for EE4

Admin privileges for EE4

Posted: August 21, 2014 at 2:39 pm


Valor Training Group

August 21, 2014 at 2:39 pm

I have one site still on EE3 because of the Roles and Permissions addon. With the changes in EE4, am I able to modify the standard roles and permissions built into WP in order to let a few senior users the ability to edit events? That’s really the only main reason I haven’t switched to EE4 on that site.

Thanks


Josh

  • Support Staff

August 21, 2014 at 4:13 pm

Hi there,

We are working on adding support for custom capabilities and support for mapping them to custom user roles to Event Espresso 4. Developers will be able to use these to build custom solutions that allow for granular control over who gets access to what.

In the meantime, you can use some filters to allow access to specific parts of the Event Espresso admin areas right now.

For example, let’s say you want to grant access to events, registrations, and transactions to a specific user role. Here’s what you can do:
1) Use add_role() or Justin Tadlock’s member plugin to assign the ‘manage_options’ cap and any applicable ‘*_posts’ caps to your seniors’ user role. This is important because EE checks for the manage_options capability.
(As an aside, you’ll want to include include ‘publish_posts’ and ‘edit_posts’ because in Event Espresso 4, events are posts).

2) Example code you can add to your custom functions file that makes use of the filters:
https://gist.github.com/joshfeck/1f89ac4e0fd7f536f2cb

3) Optionally use remove_menu_page() or a plugin like Adminimize to hide any unwanted option screens from the WP menu for the senior users.

The support post ‘Admin privileges for EE4’ 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.

Event Espresso