mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-07 15:58:19 +01:00
Add a specific role to SAML user
This commit is contained in:
@@ -306,6 +306,10 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
|
||||
// guarantee every user at least has ROLE_USER
|
||||
$roles[] = 'ROLE_USER';
|
||||
|
||||
if ($this->saml_user) {
|
||||
$roles[] = 'ROLE_SAML_USER';
|
||||
}
|
||||
|
||||
return array_unique($roles);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user