X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fmakeadmin.php;h=f19348648d8700f50b0ef8955419dbd7a0b24ecf;hb=f19b95d9b7daa82e73ca2ebf23ca55712de73107;hp=250ade221eff031920a6b8a739de20552e4f2cf4;hpb=0c4dbf158812da899ffe7969e0f2287bfc15ec5e;p=quix0rs-gnu-social.git diff --git a/actions/makeadmin.php b/actions/makeadmin.php index 250ade221e..f19348648d 100644 --- a/actions/makeadmin.php +++ b/actions/makeadmin.php @@ -87,7 +87,8 @@ class MakeadminAction extends Action return false; } $user = common_current_user(); - if (!$user->isAdmin($this->group)) { + if (!$user->isAdmin($this->group) && + !$user->hasRight(Right::MAKEGROUPADMIN)) { $this->clientError(_('Only an admin can make another user an admin.'), 401); return false; } @@ -129,7 +130,7 @@ class MakeadminAction extends Action 'profile_id' => $this->profile->id)); if (empty($member)) { - $this->serverError(_('Can\'t get membership record for %1$s in group %2$s'), + $this->serverError(_('Can\'t get membership record for %1$s in group %2$s.'), $this->profile->getBestName(), $this->group->getBestName()); } @@ -142,7 +143,7 @@ class MakeadminAction extends Action if (!$result) { common_log_db_error($member, 'UPDATE', __FILE__); - $this->serverError(_('Can\'t make %1$s an admin for group %2$s'), + $this->serverError(_('Can\'t make %1$s an admin for group %2$s.'), $this->profile->getBestName(), $this->group->getBestName()); }