migrate from PyQt6 to PySide6, remove unneeded dependencies

This commit is contained in:
2025-06-17 16:21:56 +02:00
parent c3d9daa1b0
commit 7eb55c21d0
101 changed files with 898 additions and 464 deletions

View File

@@ -44,6 +44,19 @@ class AdminCommands:
hashed_password = self.hash_password("admin")
self.db.createUser("admin", salt + hashed_password, "admin", salt)
def create_user(self, username: str, password: str, role: str = "user"):
"""Create a new user in the database.
Args:
username (str): the username of the user to be created.
password (str): the password of the user to be created.
role (str, optional): the role of the user to be created. Defaults to "user".
"""
hashed_password, salt = self.create_password(password)
self.db.createUser(
user=username, password=salt + hashed_password, role=role, salt=salt
)
def hash_password(self, password: str) -> str:
"""Hash a password using SHA256.