['can_manage_settings' => false]]; } try { $authorizationService = $container->get(AuthorizationService::class); $actorContext = ['actor_user_id' => $userId]; $canManageSettings = $authorizationService->authorize('helpdesk.settings.manage', $actorContext)->isAllowed(); $canViewTeam = $authorizationService->authorize('helpdesk.team-workload.view', $actorContext)->isAllowed(); } catch (\Throwable) { $canManageSettings = false; $canViewTeam = false; } return ['helpdesk.nav' => [ 'can_manage_settings' => $canManageSettings, 'can_view_team' => $canViewTeam, ]]; } }