feat: derive ROLE_EMPLOYEE from the account's email domain

This commit is contained in:
2026-09-13 12:49:51 +02:00
parent 443a3ed248
commit fab89dead6
7 changed files with 221 additions and 8 deletions
+10
View File
@@ -31,6 +31,12 @@ parameters:
10321389: 'Reisen-Alert Stubaital'
10554990: 'Reisen-Alert Ski & Boarderweek'
# Email domains whose accounts are members of staff. BusPro has no CRM selection expressing
# "works here", so ROLE_EMPLOYEE is derived from the address instead. Matched exactly on the
# domain part, never as a suffix.
employee_email_domains:
- 'ep-reisen.de'
# BusProNet "Hausleitung {CODE}" CRM selections, by selection id.
# DEPLOYMENT-CRITICAL: roles and hotel codes are synced on every login, so an id missing
# here does not merely fail to nominate a Hausleitung — it revokes the role and the hotel
@@ -299,6 +305,10 @@ services:
arguments:
$houseManagerIds: '%bpn_crm_house_manager_ids%'
App\Security\EmployeeDomainMatcher:
arguments:
$domains: '%employee_email_domains%'
App\Service\DomainConfigProvider:
arguments:
$domainConfig: '%domain_config%'