Support

Home Forums Event Espresso Premium ee4 paired down admin

ee4 paired down admin

Posted: September 15, 2014 at 11:31 pm


Michael Pearce

September 15, 2014 at 11:31 pm

Morning

Is there a way to pair down the admin so that they only see the event expresso part of wp admin. The thinking being we need to allow clerical person into the site – which is more than over whelming. Where as a login to only really deal with EE would be ideal.

best


Dean

September 16, 2014 at 1:20 am

Hi,

Not currently no, though it is on our to do list.

Right now the only way would be via custom development, something along the lines of this https://eventespresso.com/topic/ee4-creating-a-role-to-just-manage-espresso-events/


Michael Pearce

September 16, 2014 at 1:55 am

thanks, i’ll take a look


Dean

September 16, 2014 at 6:20 am

No problem.


Christopher David

September 16, 2014 at 7:57 am

Not to hijack this thread but I am working on the same issue right now. I have read through the old post but I am still a bit confused. Where would I add the additional functions Josh mentions in his last post? In my theme’s functions.php page? Thanks


Lorenzo Orlando Caum

  • Support Staff

September 16, 2014 at 9:57 am

Hi,

It can be added to your child theme’s functions.php file or a site specific plugin.

Link to prior support post:

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

Site specific plugin:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/


Lorenzo


Christopher David

September 16, 2014 at 1:16 pm

Thanks for the reply but I am still having problems getting this to work. I added the code to my child’s functions.php page and made sure my test user has the “Manage_options” capability but I dont see the EE4 left menu when login in with that user. My understanding here is that we are marring the EE4 capabilities to the Manage_options capability. Is this correct?

I am sure I am just missing something simple. Do you see what I could be doing wrong?


Josh

  • Support Staff

September 16, 2014 at 4:27 pm

Hi Christopher,

The forum thread that Lorenzo and Dean linked to has code that uses a deprecated filter. There’s been a recent re-factoring of EE4’s code where it handles the menus to make it much simpler than it was before.

I’ve sent a note over to the developer who has been working on this and asked for some new filters to be added into the new menu mapping to allow for filtering. I’ll update this post when we have something ready to use.


Josh

  • Support Staff

September 18, 2014 at 12:15 pm

A little update on this:

In Event Espresso 4.4.1.p (now available as an update) there are a few options on how to handle this.

The first option is for cases where you want to give full access to all of Event Espresso’s screens to a non-admin. For this, you add:

add_filter ('FHEE_management_capability', 'my_custom_menu_management_capability');

function my_custom_menu_management_capability() {
    return 'edit_posts';
}

As long as the user role has the capabilities to “edit_posts” and “manage_options“, they’ll have access to Event Espresso screens. You’ll also need to add other caps that are related to editing posts, uploading images, etc.

The other option available is for cases where you want to give limited access to Event Espresso. For example, the following code will grant access to Events, Registrations, Transactions, and Registration form pages:

add_filter ('FHEE_espresso_registrations_capability', 'my_custom_espresso_registrations_capability');
function my_custom_espresso_registrations_capability($capability){
    return 'edit_posts';
}

add_filter ('FHEE_espresso_events_capability', 'my_custom_espresso_events_capability');
function my_custom_espresso_events_capability($capability){
    return 'edit_posts';
}

add_filter ('FHEE_espresso_transactions_capability', 'my_custom_espresso_transactions_capability');
function my_custom_espresso_transactions_capability($capability){
    return 'edit_posts';
}

add_filter ('FHEE_espresso_registration_form_capability', 'my_custom_espresso_transactions_capability');
function my_custom_espresso_registration_form_capability($capability){
    return 'edit_posts';
}

An important note about these filters: These are subject to change in future major releases of Event Espresso (starting with 4.5) where we’ll be mapping specific Event Espresso features to specific capabilities. This will allow for more granular control over what can be accessed by an individual user role.


Christopher David

September 26, 2014 at 9:37 am

Thanks so much. Updating the plugin and following the instructions I was able to restrict and grant access. Guys are the best.


Josh

  • Support Staff

September 26, 2014 at 10:48 am

Hi Christopher,

You’re welcome. Please keep in mind there will be changes with the 4.5 release. When this ships, we’ll have documentation ready on how to use its new filters to manage specific Event Espresso capabilities for custom or non-admin user roles.

The support post ‘ee4 paired down admin’ 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