Fixed Login for Superuser

This commit is contained in:
2026-06-20 18:02:00 +02:00
parent 710e27c344
commit a83cec94ab
6 changed files with 86 additions and 18 deletions
+4 -2
View File
@@ -116,9 +116,11 @@ class GlobalDataProvider {
$navigation['personal'][] = ['url' => '/personal-data', 'display' => 'Meine Daten'];
$navigation['personal'][] = ['url' => '/messages', 'display' => 'Meine Nachrichten'];
$authCheck = new AuthCheckProvider();
$effectiveRole = $authCheck->getUserRole();
if (
in_array($this->user->user_role_local_group, [UserRole::USER_ROLE_ADMIN, UserRole::USER_ROLE_GROUP_LEADER] ) ||
$this->user->user_role_main === UserRole::USER_ROLE_ADMIN
in_array($effectiveRole, [UserRole::USER_ROLE_ADMIN, UserRole::USER_ROLE_GROUP_LEADER], true)
) {
$navigation['costunits'][] = ['url' => '/cost-unit/list', 'display' => 'Kostenstellen'];
$navigation['costunits'][] = ['url' => '/cost-unit/create', 'display' => 'Neue laufende Tätigkeit'];