mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-26 15:57:16 +00:00
chg: [ail users] cleanup Role_Manager
This commit is contained in:
parent
e7f1b4fd6c
commit
4dcc8c8d34
2 changed files with 2 additions and 11 deletions
|
@ -36,9 +36,6 @@ config_loader = None
|
||||||
regex_password = r'^(?=(.*\d){2})(?=.*[a-z])(?=.*[A-Z]).{10,100}$'
|
regex_password = r'^(?=(.*\d){2})(?=.*[a-z])(?=.*[A-Z]).{10,100}$'
|
||||||
regex_password = re.compile(regex_password)
|
regex_password = re.compile(regex_password)
|
||||||
|
|
||||||
# # TODO: migrate Role_Manager
|
|
||||||
|
|
||||||
|
|
||||||
#### SESSIONS ####
|
#### SESSIONS ####
|
||||||
|
|
||||||
def get_sessions():
|
def get_sessions():
|
||||||
|
@ -219,9 +216,6 @@ def get_user_hotp_code(user_id):
|
||||||
codes.append(f'{i}: {hotp.at(i)}')
|
codes.append(f'{i}: {hotp.at(i)}')
|
||||||
return codes
|
return codes
|
||||||
|
|
||||||
# TODO GET USER HOTP LISTS
|
|
||||||
# TODO RESET OTP
|
|
||||||
|
|
||||||
def is_user_otp_setup(user_id):
|
def is_user_otp_setup(user_id):
|
||||||
otp_setup = r_serv_db.hget(f'ail:user:metadata:{user_id}', 'otp_setup')
|
otp_setup = r_serv_db.hget(f'ail:user:metadata:{user_id}', 'otp_setup')
|
||||||
if otp_setup:
|
if otp_setup:
|
||||||
|
|
|
@ -2,15 +2,12 @@
|
||||||
# -*-coding:UTF-8 -*
|
# -*-coding:UTF-8 -*
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
|
||||||
import sys
|
import sys
|
||||||
import redis
|
|
||||||
import bcrypt
|
|
||||||
|
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from flask_login import LoginManager, current_user, login_user, logout_user, login_required
|
from flask_login import LoginManager, current_user, logout_user, login_required
|
||||||
|
|
||||||
from flask import request, make_response, current_app
|
from flask import make_response, current_app
|
||||||
|
|
||||||
login_manager = LoginManager()
|
login_manager = LoginManager()
|
||||||
login_manager.login_view = 'root.role'
|
login_manager.login_view = 'root.role'
|
||||||
|
|
Loading…
Reference in a new issue