Inplement user Roles

This commit is contained in:
Sebastiaan
2025-05-26 00:35:30 +02:00
parent 46610c6cbd
commit 2ce051a5f3
13 changed files with 397 additions and 35 deletions

View File

@@ -5,7 +5,7 @@ from fastapi import APIRouter, Depends, HTTPException
from fastapi.responses import HTMLResponse
from fastapi.security import OAuth2PasswordRequestForm
from app.api.deps import CurrentUser, SessionDep, get_current_active_superuser
from app.api.deps import CurrentUser, SessionDep, get_current_system_admin
from app.core import security
from app.core.config import settings
from app.core.security import get_password_hash
@@ -100,7 +100,7 @@ def reset_password(session: SessionDep, body: NewPassword) -> Message:
@router.post(
"/password-recovery-html-content/{email}",
dependencies=[Depends(get_current_active_superuser)],
dependencies=[Depends(get_current_system_admin)],
response_class=HTMLResponse,
)
def recover_password_html_content(email: str, session: SessionDep) -> Any: