chg: [config] Allow Oidc roles as string

pull/9695/head
christianmg99 2024-04-20 16:21:50 +02:00
parent 471840ce33
commit ddd0a0cd46
1 changed files with 2 additions and 0 deletions

View File

@ -74,6 +74,7 @@ class Oidc
return false;
}
$roles = is_string($roles) ? explode($this->getConfig('roles_delimiter', ','), $roles) : $roles;
$roleId = $this->getUserRole($roles, $mispUsername);
if ($roleId === null) {
$this->log($mispUsername, 'No role was assigned, access prohibited.', LOG_WARNING);
@ -231,6 +232,7 @@ class Oidc
return false;
}
$roles = is_string($roles) ? explode($this->getConfig('roles_delimiter', ','), $roles) : $roles;
$roleId = $this->getUserRole($roles, $user['email']);
if ($roleId === null) {
$this->log($user['email'], 'No role was assigned.', LOG_WARNING);