fix edit group prepare, check for admin

This commit is contained in:
Evan Prodromou 2009-01-21 10:20:13 -05:00
parent 57a9e33b3c
commit dcf973ab46

View File

@ -72,9 +72,7 @@ class EditgroupAction extends Action
return false; return false;
} }
return true; $nickname_arg = $this->trimmed('nickname');
$nickname_arg = $this->arg('nickname');
$nickname = common_canonical_nickname($nickname_arg); $nickname = common_canonical_nickname($nickname_arg);
// Permanent redirect on non-canonical nickname // Permanent redirect on non-canonical nickname
@ -97,6 +95,13 @@ class EditgroupAction extends Action
return false; 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; return true;
} }