mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-28 12:40:08 +02:00
Add a specific role to SAML user
This commit is contained in:
parent
97c3b9002a
commit
60f926924b
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue