View the WordPress admin as a different role, switch between users, temporarily change your capabilities, set default screen settings for roles, manage your roles and capabilities.
When a role or capability view is selected the current user is still the same. So if any plugins only validate a is_super_admin() check instead of current_user_can() these checks would return true.
Not 100% sure but I'd say that when a view is selected, is_super_admin() should return false.
Maybe make it optional??
Only disable on non-network admin pages
Tests:
This effectively disables functions grant_super_admin() and revoke_super_admin() since it sets/changes the $super_admins global variable. So when you switch to another super admin (as a superior admin) adding other users to the super admin list should not work.
When a role or capability view is selected the current user is still the same. So if any plugins only validate a
is_super_admin()
check instead ofcurrent_user_can()
these checks would return true.Not 100% sure but I'd say that when a view is selected,
is_super_admin()
should return false.Tests: This effectively disables functions grant_super_admin() and revoke_super_admin() since it sets/changes the
$super_admins
global variable. So when you switch to another super admin (as a superior admin) adding other users to the super admin list should not work.