Le super admin (table super_admins, master DB) ne pouvait pas se connecter via /api/login car ce firewall n'utilisait que le provider tenant. De même, le JWT n'était pas enrichi pour les super admins, l'endpoint /api/me/roles les rejetait, et le frontend redirigeait systématiquement vers /dashboard. Un chain provider (super_admin + tenant) résout l'authentification, le JwtPayloadEnricher et MyRolesProvider gèrent désormais les deux types d'utilisateurs, et le frontend redirige selon le rôle après login.
59 lines
2.2 KiB
YAML
59 lines
2.2 KiB
YAML
doctrine:
|
|
dbal:
|
|
url: '%env(resolve:DATABASE_URL)%'
|
|
profiling_collect_backtrace: '%kernel.debug%'
|
|
|
|
orm:
|
|
validate_xml_mapping: true
|
|
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
|
|
auto_mapping: true
|
|
mappings:
|
|
# Infrastructure mappings - keep entities separate from Domain
|
|
Administration:
|
|
type: attribute
|
|
is_bundle: false
|
|
dir: '%kernel.project_dir%/src/Administration/Infrastructure/Persistence/Mapping'
|
|
prefix: 'App\Administration\Infrastructure\Persistence\Mapping'
|
|
alias: Administration
|
|
Scolarite:
|
|
type: attribute
|
|
is_bundle: false
|
|
dir: '%kernel.project_dir%/src/Scolarite/Infrastructure/Persistence/Mapping'
|
|
prefix: 'App\Scolarite\Infrastructure\Persistence\Mapping'
|
|
alias: Scolarite
|
|
VieScolaire:
|
|
type: attribute
|
|
is_bundle: false
|
|
dir: '%kernel.project_dir%/src/VieScolaire/Infrastructure/Persistence/Mapping'
|
|
prefix: 'App\VieScolaire\Infrastructure\Persistence\Mapping'
|
|
alias: VieScolaire
|
|
Communication:
|
|
type: attribute
|
|
is_bundle: false
|
|
dir: '%kernel.project_dir%/src/Communication/Infrastructure/Persistence/Mapping'
|
|
prefix: 'App\Communication\Infrastructure\Persistence\Mapping'
|
|
alias: Communication
|
|
SuperAdmin:
|
|
type: attribute
|
|
is_bundle: false
|
|
dir: '%kernel.project_dir%/src/SuperAdmin/Infrastructure/Persistence/Mapping'
|
|
prefix: 'App\SuperAdmin\Infrastructure\Persistence\Mapping'
|
|
alias: SuperAdmin
|
|
controller_resolver:
|
|
auto_mapping: false
|
|
|
|
when@test:
|
|
doctrine:
|
|
dbal:
|
|
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
|
|
|
|
when@prod:
|
|
doctrine:
|
|
orm:
|
|
query_cache_driver:
|
|
type: pool
|
|
pool: doctrine.system_cache_pool
|
|
result_cache_driver:
|
|
type: pool
|
|
pool: doctrine.result_cache_pool
|