Don't force role of user if no ldap groups defined
We should not force role of user on LDAP logins if there are not Manager/Admin groups defined, return null to get the one from database as before.
This commit is contained in:
@@ -121,15 +121,14 @@ class User
|
||||
*/
|
||||
protected function getRole(array $groupIds)
|
||||
{
|
||||
$role = Role::APP_USER;
|
||||
|
||||
if (! $this->hasGroupsConfigured()) {
|
||||
if (LDAP_USER_DEFAULT_ROLE_MANAGER) {
|
||||
$role = Role::APP_MANAGER;
|
||||
} else {
|
||||
$role = Role::APP_USER;
|
||||
}
|
||||
return $role;
|
||||
return null;
|
||||
}
|
||||
|
||||
if (LDAP_USER_DEFAULT_ROLE_MANAGER) {
|
||||
$role = Role::APP_MANAGER;
|
||||
} else {
|
||||
$role = Role::APP_USER;
|
||||
}
|
||||
|
||||
foreach ($groupIds as $groupId) {
|
||||
|
||||
Reference in New Issue
Block a user