Teilnahmerechnungen erstellen

This commit is contained in:
2026-09-03 00:08:46 +02:00
parent a61344395a
commit 9c4c28e566
79 changed files with 4303 additions and 75 deletions
+5
View File
@@ -23,10 +23,14 @@ class GlobalDataProvider {
$this->user = auth()->user();
$canAccessAdmin = false;
$isMainAdmin = false;
if (null !== $this->user) {
$authCheck = new AuthCheckProvider();
$effectiveRole = $authCheck->getUserRole();
$canAccessAdmin = in_array($effectiveRole, [UserRole::USER_ROLE_ADMIN, UserRole::USER_ROLE_GROUP_LEADER], true);
// Steuert nur die Sichtbarkeit app-weiter Einstellungen im Menü; abgesichert wird über
// MainAdminRoleMiddleware.
$isMainAdmin = $authCheck->isMainAdministrator($this->user);
}
return response()->json([
@@ -37,6 +41,7 @@ class GlobalDataProvider {
'version' => config('app.version'),
'currentEvent' => $this->getCurrentEventData(),
'canAccessAdmin' => $canAccessAdmin,
'isMainAdmin' => $isMainAdmin,
]);
}