feat: rename ROLE_ADMIN to ROLE_TEAM_ADMIN since being too broad

This commit is contained in:
fromme committed 2026-09-16 17:20:45 +02:00
1 parent 39a343911a
commit d4908b6ab9
75 files changed
+212 -180

No files matched your search

+2 -2
View File
@@ -67,7 +67,7 @@ class UserType extends AbstractType
});
// Super admin is an elevation of an existing role, never a grant of its own, so the
// field exists only for somebody who already holds ROLE_ADMIN - offering it to
// field exists only for somebody who already holds ROLE_TEAM_ADMIN - offering it to
// anyone else would only produce the violation from User::validateSuperAdmin().
// A flag already set without the role is the exception: it has to stay editable, or
// that user could not be saved at all until BusPro claims them an admin again.
@@ -78,7 +78,7 @@ class UserType extends AbstractType
return;
}
if (false === in_array('ROLE_ADMIN', $user->getAssignedRoles(), true) && false === $user->isSuperAdmin()) {
if (false === in_array('ROLE_TEAM_ADMIN', $user->getAssignedRoles(), true) && false === $user->isSuperAdmin()) {
return;
}