Other roles access management

Other Roles Access additional module for User Role Editor Pro WordPress plugin allows to block roles from selection in the WordPress drop-down lists (e.g at user profile) by the user with current role. Those roles tabs at the “Users” page will be hidden from the current role too. This way you may add to your WordPress some kind of roles hierarchy – which roles are available for the current one, but which are not.
Turn on this checkbox at “Additional Module” tab of User Role Editor Setting page in order to activate “Other Roles Access” add-on:

activate other roles access module
Activate Other Roles Access module

Then you will see new added button “Other Roles” at “Users->User Role Editor” page:

other roles access button
Other Roles Access button

“Other Roles” button works only for a role with “edit_users” capability included. This button opens dialog window with the list of user roles. Turn on checkboxes near the roles you wish to block for the current role, e.g. “User Manager” in our example (administrator role is blocked automatically):
other roles access dialog
Other Roles Access dialog

Press “Update” to save your changes. After this the user with “User Manager role” role will not see blocked roles at the WordPress drop-down lists, like at the top of “Users” page and “User profile” page:
restricted change role drop-down list
Restriced change role drop-down list

Users with blocked roles will not be available for view/edit for the restricted role at the “Users” page also. It’s not possible to assign blocked roles to the new user at the “Users->Add New” page.

Restrictions set by this add-on are not applied to a user with ‘administrator’ role under single site WordPress installation.

WordPress multisite

Restrictions set by this add-on are not applied to a user with ‘administrator’ role by default under WordPress multisite. Take this into account when try to block access to some roles selection for single site admins.
It’s possible to change the default behavior for WordPress multisite via custom filter ‘ure_not_block_other_roles_for_local_admin’, using this code:


add_filter('ure_not_block_other_roles_for_local_admin','my_not_block_other_roles_for_local_admin');

function my_not_block_other_roles_for_local_admin($flag) {

return false;
}

Share