DÉMO
dev only

Administration

Admin dashboard with user and organization management.

Overview

The admin area is available at /admin and restricted to users with ROLE_SUPER_ADMIN. It has a dedicated layout, independent of the public layout.

Feature Detail
Dashboardsrc/Controller/Admin/DashboardController.php
User managementsrc/Controller/Admin/UsersController.php
Organization managementsrc/Controller/Admin/OrganizationsController.php
Account deletionsrc/Service/Auth/AccountDeletionService.php
Organization deletionsrc/Service/Organization/OrganizationDeletionService.php
Admin layouttemplates/admin/base.html.twig
Sidebar Stimulusassets/controllers/sidebar_controller.js

Access & security

Access to the admin area is protected by a dedicated Symfony firewall (pattern ^/admin, before the main firewall). Only ROLE_SUPER_ADMIN can access it.

FeatureDetail
Required roleROLE_SUPER_ADMIN
Dedicated login pageGET /admin/login
Promote a super adminphp bin/console app:admin:promote <email>
Admin access logsrc/EventSubscriber/AdminAccessSubscriber.php

The TenantSubscriber skips all /admin routes — the tenant context is not resolved in the admin area.

Layout & responsive sidebar

The admin layout uses a fixed sidebar on desktop (≥ 1024px) and an off-canvas drawer on mobile, driven by the Stimulus sidebar controller.

assets/styles/components/_admin.scss

Stimulus sidebar (drawer)

The sidebar is driven by sidebar_controller.js. It handles open/close, scroll locking, and closing on Escape key.

data-controller="sidebar"
data-sidebar-target="panel"    data-sidebar-target="overlay"  data-action="sidebar#toggle"   
assets/controllers/sidebar_controller.js

User management

UsersController exposes 4 routes protected by ROLE_SUPER_ADMIN. All POST actions are CSRF-protected.

RouteAction
GET /admin/usersList all users
GET /admin/users/{id}Detail: identity, security, organizations
POST /admin/users/{id}/toggle-adminGrant or revoke ROLE_SUPER_ADMIN
POST /admin/users/{id}/deleteForce-delete account

Self-protection: a super admin cannot delete themselves or remove their own rights from the UI.

Admin deletion calls AccountDeletionService::forceDelete() which bypasses the sole-owner organization check.

src/Service/Auth/AccountDeletionService.php

Organization management

OrganizationsController exposes 3 routes protected by ROLE_SUPER_ADMIN. All POST actions are CSRF-protected.

RouteAction
GET /admin/organizationsList all organizations
GET /admin/organizations/{id}Detail: info, subscription, members
POST /admin/organizations/{id}/deleteFully delete the organization

OrganizationDeletionService explicitly deletes subscriptions (no cascade remove on that relation) then removes the organization (cascade on members and invitations).

src/Service/Organization/OrganizationDeletionService.php
Loading…
Loading the web debug toolbar…
Attempt #