update_core
update_plugins
update_themes
install_plugins
install_themes
delete_themes
edit_plugins
edit_themes
Hi, I want to restrict those capabilities to user_id = 1 so other super admins cant edit network files. (Btw if i am missing something, let me know). What is proper way of this? Tried http://wordpress.org/extend/plugins/extended-super-admins/ but it adds ‘manage_esa_options’ cap to every blog so super_admins see tons of blogs in their admin bar..
Editing super admin capabilities is a little different from editing the capabilities of every other role, because there is a slight detour in the way WP checks the current user’s capabilities. This is what you find on
capabilities.php
on line 864:This means that we have to explicitly add ‘do_not_allow’ to the an array which contains the capability we want to block. In effect:
I’ve tested this and it seems to block additional super-admins from doing those things you want to prevent, and it does so fairly silently (i.e. redirects them to the network dashboard).
For the record, my previous answer, would work for most cases except the one you were asking for. My apologies 🙂