mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-22 13:34:04 +03:00
Merge remote-tracking branch 'origin/v3.6'
This commit is contained in:
commit
6b4edc8e7a
@ -169,7 +169,7 @@ class InternalDBAuth(auths.Authenticator):
|
||||
def getGroups(self, username: str, groupsManager: 'auths.GroupsManager'):
|
||||
dbAuth = self.dbAuthenticator()
|
||||
try:
|
||||
user: 'models.User' = dbAuth.users.get(name=username, state=State.ACTIVE)
|
||||
user: 'models.User' = dbAuth.users.get(name=username.lower(), state=State.ACTIVE)
|
||||
except Exception:
|
||||
return
|
||||
|
||||
@ -178,7 +178,7 @@ class InternalDBAuth(auths.Authenticator):
|
||||
def getRealName(self, username: str) -> str:
|
||||
# Return the real name of the user, if it is set
|
||||
try:
|
||||
user = self.dbAuthenticator().users.get(name=username, state=State.ACTIVE)
|
||||
user = self.dbAuthenticator().users.get(name=username.lower(), state=State.ACTIVE)
|
||||
return user.real_name or username
|
||||
except Exception:
|
||||
return super().getRealName(username)
|
||||
|
Loading…
Reference in New Issue
Block a user