feat: adjust oauth2 implementation for TYPO3 backend login

This commit is contained in:
Björn Fromme
2026-03-16 12:00:56 +01:00
parent ee84690cd9
commit d1e807b11f
7 changed files with 24 additions and 9 deletions
+6 -2
View File
@@ -117,9 +117,12 @@ class BpnAuthenticator extends AbstractLoginFormAuthenticator implements Authent
private function collectRoles(CrmAttributes $crmAttributes): array
{
// Collect user's roles from CRM attributes
$roles = [];
// All users inherit the default role 'customer'
$roles = [
'ROLE_CUSTOMER',
];
// Get user's base role from CRM attributes
if ($crmAttributes->admin) {
$roles[] = 'ROLE_ADMIN';
} elseif ($crmAttributes->manager) {
@@ -128,6 +131,7 @@ class BpnAuthenticator extends AbstractLoginFormAuthenticator implements Authent
$roles[] = 'ROLE_HOUSE_MANAGER';
}
// All users can have role 'teamer' additionally
if ($crmAttributes->teamer) {
$roles[] = 'ROLE_TEAMER';
}