mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-22 13:34:04 +03:00
Fixed groups on internal auth
This commit is contained in:
parent
1c31e01199
commit
6270119d2b
@ -82,10 +82,12 @@ class InternalDBAuth(Authenticator):
|
|||||||
# and access will be denied
|
# and access will be denied
|
||||||
try:
|
try:
|
||||||
usr = auth.users.get(name=username, state=State.ACTIVE)
|
usr = auth.users.get(name=username, state=State.ACTIVE)
|
||||||
|
groups = usr.groups.all()
|
||||||
usr.id = None
|
usr.id = None
|
||||||
if usr.real_name.strip() == '':
|
if usr.real_name.strip() == '':
|
||||||
usr.real_name = usr.name
|
usr.real_name = usr.name
|
||||||
usr.name = newUsername
|
usr.name = newUsername
|
||||||
|
usr.groups = groups
|
||||||
usr.save()
|
usr.save()
|
||||||
except:
|
except:
|
||||||
logger.exception('Exception')
|
logger.exception('Exception')
|
||||||
|
Loading…
Reference in New Issue
Block a user