incompatible with older gs, and unnecessary

This commit is contained in:
Hannes Mannerheim 2016-03-07 18:35:03 +01:00
parent 6ecf09bf5c
commit 6494335e79

View File

@ -86,10 +86,6 @@ class ApiQvitterSandboxCreateAction extends ApiAuthAction
if (!$this->scoped->hasRight(Right::SANDBOXUSER)) { if (!$this->scoped->hasRight(Right::SANDBOXUSER)) {
$this->clientError(_('You cannot sandbox users on this site.'), 403); $this->clientError(_('You cannot sandbox users on this site.'), 403);
} }
// Only administrators can sandbox other privileged users (such as others who have the right to sandbox).
if ($this->scoped->isPrivileged() && !$this->scoped->hasRole(Profile_role::ADMINISTRATOR)) {
$this->clientError(_('You cannot sandbox other privileged users.'), 403);
}
// only sandbox of the user isn't sandboxed // only sandbox of the user isn't sandboxed
if (!$this->other->isSandboxed()) { if (!$this->other->isSandboxed()) {