Support

Home Forums Event Espresso Premium EE4 creating a role to just manage Espresso Events

EE4 creating a role to just manage Espresso Events

Posted: March 6, 2014 at 4:49 pm


standoutsites

March 6, 2014 at 4:49 pm

EE4:4.8.1reg
WP: 3.8.1

I have created a role Event Manager with the plugin User Role Editor. I have designated the following permissions (capabilities) for this role, but when the user with that role logs in, he is not able to access Espresso Events (but he sees the link only at the top of the admin tool bar). Am I missing some capability or there is a plugin conflict?:

delete_event_categories
delete_events
delete_locations
delete_others_events
delete_others_locations
delete_others_recurring_events
delete_recurring_events
edit_event_categories
edit_events
edit_locations
edit_others_events
edit_others_locations
edit_others_recurring_events
edit_recurring_events
manage_bookings
manage_others_bookings
publish_events
publish_locations
publish_recurring_events
read_others_locations
read_private_events
read_private_locations
upload_event_images


Josh

  • Support Staff

March 6, 2014 at 4:59 pm

Hi there,

This really isn’t a plugin conflict because in order to access Event Espresso menus a role management plugin would have to use an Event Espresso-specific filter:

Inside the EE_Admin_Page_Init class there is a filter hook that can be used by a plugin developer to change the defaults:

apply_filters( 'FHEE_' . $this->menu_slug . '_capability', $capability )

Where menu_slug corresponds to the menu slug for the page system (i.e. espresso_events) that affects the menu being shown.


standoutsites

March 6, 2014 at 5:06 pm

Hi Josh,

Is there a list of all Espresso Events capabilities somewhere?


Josh

  • Support Staff

March 7, 2014 at 12:33 pm

Hi there,

As far as I know, there are no Event Espresso capabilities. That said, you can use existing capabilities and allow users that have a specific capability to access a specific Event Espresso menu. For example, you can assign the ‘manage_options’ capability to a user role and use Event Espresso’s filters to grant access by writing a few functions like this:

add_filter ('FHEE_management_capability', 'my_custom_menu_management_capability');

function my_custom_menu_management_capability() {
    return 'manage_options';
}

add_filter ('FHEE_espresso_events_capability', 'my_custom_espresso_events_capability');

function my_custom_espresso_events_capability($capability){
    return 'manage_options';
}

add_filter ('FHEE_espresso_registrations_capability', 'my_custom_espresso_registrations_capability');

function my_custom_espresso_registrations_capability($capability){
    return 'manage_options';
}


Josh

  • Support Staff

October 16, 2014 at 10:30 am

Update: Starting with EE4.4, the filters have changed slightly. Please see this update for more info:

http://eventespresso.com/topic/ee4-paired-down-admin/#post-118343

Starting with EE4.5, Event Espresso capabilities are added, which allow for more finely tuned control over who can do what and you’ll be able to manage the capabilities by using a plugin like Members from Justin Tadlock.


timnethers

October 30, 2014 at 7:16 am

I LOVE MEMBERS PLUGIN. Thank you, its the best of the plugins, I had even contacted Justin about this. How can I get Beta access? Need this badly.


Lorenzo Orlando Caum

  • Support Staff

October 30, 2014 at 10:05 am

Hi,

This is available from the pre-release channel. Be sure to backup your WordPress before making any changes!

http://eventespresso.com/users/timnethers/#ee4-pre-downloads


Lorenzo

The support post ‘EE4 creating a role to just manage Espresso Events’ 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  Lorenzo Orlando Caum 4 years, 8 months ago ago

Topic Tags

Tagged: ,

Notifications

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