Fixes in user login
This commit is contained in:
parent
d6fc5b0c4b
commit
5066f5320c
7 changed files with 319 additions and 9 deletions
|
|
@ -8,12 +8,15 @@ def check_login(callback):
|
|||
|
||||
if 'session' in request.environ:
|
||||
|
||||
if request.environ['session'].get('login_admin', 0):
|
||||
if request.environ['session'].get('login_admin', False) and not request.environ['session'].get('verify_auth', False):
|
||||
|
||||
result = callback(*args, **kwargs)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
if request.environ['session'].get('verify_auth', False):
|
||||
redirect(app.get_url('admin_app.need_auth'))
|
||||
|
||||
redirect(app.get_url('admin_app.login_admin'))
|
||||
|
||||
return wrapper
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue