User roles and permission management via Admin UI (#1231)

This commit is contained in:
Kevin Papst
2019-11-10 18:53:56 +01:00
committed by GitHub
parent c6c4098759
commit af0f89774e
58 changed files with 1355 additions and 186 deletions

View File

@@ -82,15 +82,8 @@ class UserVoter extends AbstractVoter
return $this->hasRolePermission($user, 'delete_user');
// used in templates and ProfileController
case self::VIEW:
case self::EDIT:
// always allow the user to edit these own settings
if ($subject->getId() === $user->getId()) {
return true;
}
// no break on purpose
case self::PREFERENCES:
case self::PASSWORD:
case self::API_TOKEN: