Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6978
    byronclinic
    Participant

    I have a multisite network and am using URE to disable many of the admin menu items.

    However there are some admin menu items that don’t show up in the URE admin menu editor.

    For example, Appearance > Background, Tools > Delete Site.

    Also, how to remove Users > User Role Editor in the admin backend for subsite of an admin user? I have unchecked “Allow single site administrator access to User Role Editor”.

    #6979
    Vladimir
    Keymaster

    1st, look if you can revoke from a role unneeded capabilities. Capabilities started from ‘ure_’ protect access to User Role Editor. Revoke them from ‘administrator’ role and single site admin will not see Users->User Role Editor (ure_edit_roles) and Settings->User Role Editor (manage_network_plugins).

    2nd, use URE Pro Admin menu access as the 2nd level of configuration, admin menu access, when you can not revoke some capability, which is in use by different menu items at the same time, like manage_options or edit_posts.

    #6980
    Vladimir
    Keymaster

    “Tools->Delete Site” is protected by default by ‘delete_site’ capability, which is mapped by WordPress to ‘manage_options’, wp-includes/capabilities.php:

    
    case 'delete_site':
    	if ( is_multisite() ) {
    		$caps[] = 'manage_options';
    	} else {
    		$caps[] = 'do_not_allow';
    	}
    	break;
    

    So if role does not have ‘manage_options’ capability URE will not show this menu item in the “Admin menu” dialog.
    My test shows that “Admin menu” allows to block “Tools->Delete Site” successfully in case role has ‘manage_options’ capability for other purpose.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.