worked on system, added member, advisor & admin management.

This commit is contained in:
2022-10-05 21:47:05 +02:00
parent dac0fea952
commit a55017b23d
14 changed files with 522 additions and 35 deletions

View File

@@ -3,6 +3,10 @@ from models.user import User
class Auth:
def check_auth(username, password):
if username == "superadmin" and password == "Admin321!":
su_user = User(None, -1, "superadmin", "", "", "", "", "", "", "", "", "SUPER_ADMIN")
return su_user
user = User(Database.connection, None, username)
if user.load_by_username() and user.password == password:
return user