1
0
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:
Adolfo Gómez 2013-05-14 11:54:51 +00:00
parent 1c31e01199
commit 6270119d2b

View File

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