mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-24 21:34:41 +03:00
Fixed "realname overwrite" on internaldb auth
This commit is contained in:
parent
2400cc99cd
commit
de9c06bc2c
@ -158,6 +158,14 @@ class InternalDBAuth(auths.Authenticator):
|
||||
|
||||
groupsManager.validate([g.name for g in user.groups.all()])
|
||||
|
||||
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)
|
||||
return user.real_name or username
|
||||
except Exception:
|
||||
return super().getRealName(username)
|
||||
|
||||
def createUser(self, usrData):
|
||||
pass
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user