Correcting user name in logging
This commit is contained in:
parent
f1ed7575ff
commit
be0a5f5e99
@ -147,7 +147,7 @@ class SAuth(object):
|
|||||||
if(user is not None):
|
if(user is not None):
|
||||||
pw=user.password
|
pw=user.password
|
||||||
if pw is None or not len(pw.split('/'))==3 :
|
if pw is None or not len(pw.split('/'))==3 :
|
||||||
logger.warn("Login FAIL user {} from {}".format(user, ip))
|
logger.warn("Login FAIL user {} from {}".format(username, ip))
|
||||||
_redirect(fail_redirect)
|
_redirect(fail_redirect)
|
||||||
return False
|
return False
|
||||||
pw=pw.split('/')
|
pw=pw.split('/')
|
||||||
@ -158,11 +158,11 @@ class SAuth(object):
|
|||||||
if(pw[2]==pwtest):
|
if(pw[2]==pwtest):
|
||||||
get_session()['username']=username
|
get_session()['username']=username
|
||||||
get_session()['roles']=self.get_user_roles(username)
|
get_session()['roles']=self.get_user_roles(username)
|
||||||
logger.info("Login OK user {} from {}".format(user, ip))
|
logger.info("Login OK user {} from {}".format(username, ip))
|
||||||
if(success_redirect is not None):
|
if(success_redirect is not None):
|
||||||
_redirect(success_redirect)
|
_redirect(success_redirect)
|
||||||
return True
|
return True
|
||||||
logger.warn("Login FAIL user {} from {}".format(user, ip))
|
logger.warn("Login FAIL user {} from {}".format(username, ip))
|
||||||
_redirect(fail_redirect)
|
_redirect(fail_redirect)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user