forked from mirror/Part-DB.Part-DB-server
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
|
// guarantee every user at least has ROLE_USER
|
||||||
$roles[] = 'ROLE_USER';
|
$roles[] = 'ROLE_USER';
|
||||||
|
|
||||||
|
if ($this->saml_user) {
|
||||||
|
$roles[] = 'ROLE_SAML_USER';
|
||||||
|
}
|
||||||
|
|
||||||
return array_unique($roles);
|
return array_unique($roles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue