initial commit

This commit is contained in:
2025-06-03 14:01:08 +00:00
commit 6ab9ceed4b
50 changed files with 2253 additions and 0 deletions

12
dashboard/utils/auth.py Normal file
View File

@@ -0,0 +1,12 @@
# dashboard/utils/auth.py
import bcrypt
def hash_password(plain_text: str) -> str:
return bcrypt.hashpw(plain_text.encode("utf-8"), bcrypt.gensalt()).decode("utf-8")
def check_password(plain_text: str, hashed: str) -> bool:
return bcrypt.checkpw(plain_text.encode("utf-8"), hashed.encode("utf-8"))
def get_user_role(username: str) -> str:
# Beispiel: aus der Datenbank auslesen (oder Hardcode während Dev-Phase)
pass