Change WordPress user roles and capabilities › Forums › Give user access to plugin – how to › Restrict Access to User Role Editor for Multisite Users › Reply To: Restrict Access to User Role Editor for Multisite Users
14/06/2016 at 03:18
#2413
Vladimir
Keymaster
Hi Luke,
Historically a user with ‘manage_network_users’ capability is a superadmin for the User Role Editor under WordPress multisite. I see that in rare cases as yours it should be changed and I will do it with one of the next update.
Workaround – take a code below, insert it into the separate .php file and place that file into wp-content/mu-plugins/ folder:
<?php
add_action('plugins_loaded', 'remove_ure_from_network_menu');
function remove_ure_from_network_menu() {
if (current_user_can('manage_network_plugins')) {
return;
}
remove_action('network_admin_menu', array($GLOBALS['user_role_editor'], 'network_plugin_menu'));
}