Support

Home Forums Event Espresso Premium Any way to give access to Event coordinators without making them admins?

Any way to give access to Event coordinators without making them admins?

Posted: October 15, 2014 at 3:36 pm


Peter Levine

October 15, 2014 at 3:36 pm

Hello there,

Love the software so far. The functionality may not be here yet, but can I give the event coordinator access to EE4 without making them an admin? Also, can you direct me to the best way to send emails to the specific organizers of each event when attendees sign up for the events they cover? Thank you.


Lorenzo Orlando Caum

  • Support Staff

October 15, 2014 at 7:12 pm

Hi Peter, please see the following example on how to setup a restricted user role:

https://eventespresso.com/topic/ee4-creating-a-role-to-just-manage-espresso-events/#post-84802


Lorenzo


Peter Levine

October 15, 2014 at 11:20 pm

Thank you for answering so promptly on year, Lorenzo.


Josh

  • Support Staff

October 16, 2014 at 10:31 am

Hi Peter,

There are some updates to the information in the thread that Lorenzo linked to. You can review them here:

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


Peter Levine

October 17, 2014 at 2:46 pm

Hi Josh, Lorenzo,

Thank you for your efforts. I have been having fun today trying it out. I would like to ask you, however, to check my code and let me know what I am doing wrong:
I have been able to successfully create the “Event Coordinator” Role.

Based on the three articles that seemed to cover this, I added the following code to my child theme functions.php page, reloaded a page on my local install, and then commented it out.

/*Add New User role - Event Coordinator--One time use, now commented out to prevent error messages*/ 

add_role('event_coordinator', 'Event Coordinator', array(
    'read' => true, // True allows that capability
    'edit_posts' => true,
    'delete_posts' => false, // Use false to explicitly deny
    'upload_files' => true,
    'edit_plugins' => true,
    'delete_event_categories' => true,
    'delete_events' => true,
    'delete_locations' => true,
    'delete_others_events' => true,
    'delete_others_locations' => true,
    'delete_others_recurring_events' => true,
    'delete_recurring_events' => true,
    'edit_event_categories' => true,
    'edit_events' => true,
    'edit_locations' => true,
    'edit_others_events' => true,
    'edit_others_locations' => true,
    'edit_others_recurring_events' => true,
    'edit_recurring_events' => true,
    'manage_bookings' => true,
    'manage_others_bookings' => true,
    'publish_events' => true,
    'publish_locations' => true,
    'publish_recurring_events' => true,
    'read_others_locations' => true,
    'read_private_events' => true,
    'read_private_locations' => true,
    'upload_event_images' => true,
    'manage_options' => true,
));

add_filter ('FHEE_management_capability', 'my_custom_menu_management_capability');

function my_custom_menu_management_capability() {
    return 'edit_posts';
}

However, when I change the role for my coordinator’s account to Event Coordinator, when I login to their admin page, they get access to ThemeMyLogin’s (another plugin) admin menu, but not EE’s. THis is so strange.

Do you have any idea what I am doing wrong here? Here is the listing under wp_user_roles table for event coordinator:

event_coordinator";a:2:{s:4:"name";s:17:"Event Coordinator";s:12:"capabilities";a:29:{s:4:"read";b:1;s:10:"edit_posts";b:1;s:12:"delete_posts";b:0;s:12:"upload_files";b:1;s:12:"edit_plugins";b:1;s:23:"delete_event_categories";b:1;s:13:"delete_events";b:1;s:16:"delete_locations";b:1;s:20:"delete_others_events";b:1;s:23:"delete_others_locations";b:1;s:30:"delete_others_recurring_events";b:1;s:23:"delete_recurring_events";b:1;s:21:"edit_event_categories";b:1;s:11:"edit_events";b:1;s:14:"edit_locations";b:1;s:18:"edit_others_events";b:1;s:21:"edit_others_locations";b:1;s:28:"edit_others_recurring_events";b:1;s:21:"edit_recurring_events";b:1;s:15:"manage_bookings";b:1;s:22:"manage_others_bookings";b:1;s:14:"publish_events";b:1;s:17:"publish_locations";b:1;s:24:"publish_recurring_events";b:1;s:21:"read_others_locations";b:1;s:19:"read_private_events";b:1;s:22:"read_private_locations";b:1;s:19:"upload_event_images";b:1;s:14:"manage_options";b:1;}}}

Any advice on the next troubleshooting step? Also, I am running on git here with multiple database backups. So I can totally replace this to start fresh.


Tony

  • Support Staff

October 20, 2014 at 3:58 am

Hi Peter,

I’ve just ran that code on a test site, set up a new user with the Event Coordinator role and have no issue editing Event Espresso – http://take.ms/Q8gtK

Are you commenting all of that code out?

The filter needs to stay active, as that code states the capability needed, so make sure this is uncommented:

add_filter ('FHEE_management_capability', 'my_custom_menu_management_capability');

function my_custom_menu_management_capability() {
    return 'edit_posts';
}

That should then work fine.

Is that not the case for yourself?


Peter Levine

October 29, 2014 at 3:17 pm

Hi Tony,

I was traveling and just got back. Thank you for your reply.

You are correct, I HAD commented out the add_filter function, thinking it was a one time thing. Now it works perfectly.

Thanks for your reply. This can be closed out.

The support post ‘Any way to give access to Event coordinators without making them admins?’ 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