chg: [ail users] cleanup Role_Manager

This commit is contained in:
terrtia 2024-08-13 14:59:30 +02:00
parent e7f1b4fd6c
commit 4dcc8c8d34
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
2 changed files with 2 additions and 11 deletions

View file

@ -36,9 +36,6 @@ config_loader = None
regex_password = r'^(?=(.*\d){2})(?=.*[a-z])(?=.*[A-Z]).{10,100}$'
regex_password = re.compile(regex_password)
# # TODO: migrate Role_Manager
#### SESSIONS ####
def get_sessions():
@ -219,9 +216,6 @@ def get_user_hotp_code(user_id):
codes.append(f'{i}: {hotp.at(i)}')
return codes
# TODO GET USER HOTP LISTS
# TODO RESET OTP
def is_user_otp_setup(user_id):
otp_setup = r_serv_db.hget(f'ail:user:metadata:{user_id}', 'otp_setup')
if otp_setup:

View file

@ -2,15 +2,12 @@
# -*-coding:UTF-8 -*
import os
import re
import sys
import redis
import bcrypt
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.login_view = 'root.role'