Upgrade to 3.2.1

This commit is contained in:
Bastian Allgeier
2019-07-09 16:45:40 +02:00
parent 7b4170f17e
commit 2694b3d76f
38 changed files with 282 additions and 150 deletions

View File

@@ -25,6 +25,11 @@ class UserPermissions extends ModelPermissions
protected function canChangeRole(): bool
{
// users who are not admins cannot change their own role
if ($this->user->is($this->model) === true && $this->user->isAdmin() === false) {
return false;
}
return $this->model->isLastAdmin() !== true;
}