Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let is_super_admin() return false when a role/caps view is selected #53

Closed
JoryHogeveen opened this issue Apr 28, 2017 · 0 comments
Closed

Comments

@JoryHogeveen
Copy link
Owner

JoryHogeveen commented Apr 28, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant