fix edit group prepare, check for admin
This commit is contained in:
parent
57a9e33b3c
commit
dcf973ab46
|
@ -72,9 +72,7 @@ class EditgroupAction extends Action
|
|||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
$nickname_arg = $this->arg('nickname');
|
||||
$nickname_arg = $this->trimmed('nickname');
|
||||
$nickname = common_canonical_nickname($nickname_arg);
|
||||
|
||||
// Permanent redirect on non-canonical nickname
|
||||
|
@ -97,6 +95,13 @@ class EditgroupAction extends Action
|
|||
return false;
|
||||
}
|
||||
|
||||
$cur = common_current_user();
|
||||
|
||||
if (!$cur->isAdmin($group)) {
|
||||
$this->clientError(_('You must be an admin to edit the group'), 403);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user