Skip to content

Commit

Permalink
Fixes security issue where an admin user could possibly edit a super-…
Browse files Browse the repository at this point in the history
…admin user [#1322 state:resolved]
  • Loading branch information
dleffler committed Dec 26, 2015
1 parent c4a42e5 commit 1d8f6e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions framework/modules/users/controllers/usersController.php
Expand Up @@ -114,6 +114,10 @@ public function edituser() {
// check to see if we should be editing. You either need to be an admin, or editing own account.
if ($user->isAdmin() || ($user->id == $id && !$user->globalPerm('prevent_profile_change'))) {
$u = new user($id);
if ($u->isSuperAdmin() && $user->isActingAdmin()) { // prevent regular admin's from editing super-admins
flash('error', gt('You do not have the proper permissions to edit this user'));
expHistory::back();
}
} else {
flash('error', gt('You do not have the proper permissions to edit this user'));
expHistory::back();
Expand Down

0 comments on commit 1d8f6e4

Please sign in to comment.