Refactor authentication system (#2602)

Make auth configuration available via UI, remove FOSUserBundle and SAML-Bundle dependency
This commit is contained in:
Kevin Papst
2021-06-10 15:34:13 +02:00
committed by GitHub
parent 286b63e2c8
commit 7f20cb045c
155 changed files with 5590 additions and 1802 deletions

View File

@@ -262,7 +262,7 @@ class UserRepository extends EntityRepository implements UserLoaderInterface
if ($query->getRole() !== null) {
$rolesWhere = 'u.roles LIKE :role';
$qb->setParameter('role', '%' . $query->getRole() . '%');
// a hack as FOSUserBundle does not save the ROLE_USER in the database as it is the default role
// a workaround, because ROLE_USER is not saved in the database
if ($query->getRole() === User::ROLE_USER) {
$rolesWhere .= ' OR u.roles LIKE :role1';
$qb->setParameter('role1', '%{}');