mirror of https://github.com/CIRCL/AIL-framework
fix: [debug]
parent
8e819f85cd
commit
b844c34715
|
@ -448,7 +448,6 @@ class AILUser(UserMixin):
|
||||||
|
|
||||||
def rotate_session(self):
|
def rotate_session(self):
|
||||||
self.id = _rotate_user_session(self.user_id)
|
self.id = _rotate_user_session(self.user_id)
|
||||||
print('rotate session:', self.id)
|
|
||||||
return self.id
|
return self.id
|
||||||
|
|
||||||
def kill_session(self):
|
def kill_session(self):
|
||||||
|
@ -527,9 +526,7 @@ class AILUser(UserMixin):
|
||||||
|
|
||||||
## ROLE ##
|
## ROLE ##
|
||||||
|
|
||||||
def is_in_role(self, role): # TODO Get role via user alternative ID
|
def is_in_role(self, role):
|
||||||
print('is_in_role')
|
|
||||||
print(f'ail:users:role:{role}', self.user_id)
|
|
||||||
if r_serv_db.sismember(f'ail:users:role:{role}', self.user_id):
|
if r_serv_db.sismember(f'ail:users:role:{role}', self.user_id):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -22,7 +22,7 @@ sys.path.append(os.environ['AIL_BIN'])
|
||||||
##################################
|
##################################
|
||||||
# Import Project packages
|
# Import Project packages
|
||||||
##################################
|
##################################
|
||||||
from lib import Users
|
from lib import Users # TODO ########################################################3
|
||||||
from lib.ail_users import AILUser, kill_sessions
|
from lib.ail_users import AILUser, kill_sessions
|
||||||
from lib.ConfigLoader import ConfigLoader
|
from lib.ConfigLoader import ConfigLoader
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ def login():
|
||||||
if current_user.is_authenticated:
|
if current_user.is_authenticated:
|
||||||
return redirect(url_for('dashboard.index'))
|
return redirect(url_for('dashboard.index'))
|
||||||
else:
|
else:
|
||||||
print(current_user)
|
# print(current_user)
|
||||||
next_page = request.args.get('next')
|
next_page = request.args.get('next')
|
||||||
error = request.args.get('error')
|
error = request.args.get('error')
|
||||||
return render_template("login.html", next_page=next_page, error=error)
|
return render_template("login.html", next_page=next_page, error=error)
|
||||||
|
|
Loading…
Reference in New Issue