mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-26 15:57:16 +00:00
fix: [debug]
This commit is contained in:
parent
8e819f85cd
commit
b844c34715
2 changed files with 3 additions and 6 deletions
|
@ -448,7 +448,6 @@ class AILUser(UserMixin):
|
|||
|
||||
def rotate_session(self):
|
||||
self.id = _rotate_user_session(self.user_id)
|
||||
print('rotate session:', self.id)
|
||||
return self.id
|
||||
|
||||
def kill_session(self):
|
||||
|
@ -527,9 +526,7 @@ class AILUser(UserMixin):
|
|||
|
||||
## ROLE ##
|
||||
|
||||
def is_in_role(self, role): # TODO Get role via user alternative ID
|
||||
print('is_in_role')
|
||||
print(f'ail:users:role:{role}', self.user_id)
|
||||
def is_in_role(self, role):
|
||||
if r_serv_db.sismember(f'ail:users:role:{role}', self.user_id):
|
||||
return True
|
||||
else:
|
||||
|
|
|
@ -22,7 +22,7 @@ sys.path.append(os.environ['AIL_BIN'])
|
|||
##################################
|
||||
# Import Project packages
|
||||
##################################
|
||||
from lib import Users
|
||||
from lib import Users # TODO ########################################################3
|
||||
from lib.ail_users import AILUser, kill_sessions
|
||||
from lib.ConfigLoader import ConfigLoader
|
||||
|
||||
|
@ -136,7 +136,7 @@ def login():
|
|||
if current_user.is_authenticated:
|
||||
return redirect(url_for('dashboard.index'))
|
||||
else:
|
||||
print(current_user)
|
||||
# print(current_user)
|
||||
next_page = request.args.get('next')
|
||||
error = request.args.get('error')
|
||||
return render_template("login.html", next_page=next_page, error=error)
|
||||
|
|
Loading…
Reference in a new issue