Fix: authorization helper won't send a list of center if an admin is authenticated

This commit is contained in:
2023-04-24 15:50:27 +02:00
parent 0c5a06c678
commit 9918cf2d58
3 changed files with 17 additions and 36 deletions

View File

@@ -120,6 +120,11 @@ class AuthorizationHelper implements AuthorizationHelperInterface
if ($role instanceof Role) {
$role = $role->getRole();
}
if (!$user instanceof User) {
return [];
}
/** @var array<string, Center> $centers */
$centers = [];