1
0
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:
Adolfo Gómez García 2023-04-20 13:39:36 +02:00
commit 6b4edc8e7a
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23

View File

@ -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)