Primo commit

This commit is contained in:
2026-01-13 11:20:12 +01:00
parent ce9e2fdf2a
commit 17453f5d13
51 changed files with 3883 additions and 2508 deletions

View File

@@ -5,6 +5,7 @@ Common helpers used across the application
import uuid
import re
from typing import TYPE_CHECKING
from database.models import UserRole
from app import config
@@ -24,7 +25,7 @@ def is_ldap_user(user: "User") -> bool:
def is_ldap_admin(user: "User") -> bool:
"""Check if user is an LDAP-managed admin"""
return is_ldap_user(user) and user.role == "admin"
return is_ldap_user(user) and user.role == UserRole.ADMIN
def validate_password(password: str) -> list[str]: