15 phase 3 tournament add

This commit is contained in:
2026-03-06 17:31:13 +00:00
parent 08c5a8387f
commit 8fb576afc7
7 changed files with 191 additions and 0 deletions

View File

@@ -34,3 +34,14 @@ async def get_current_user(
raise credentials_exception
return user
async def get_current_superuser(
current_user: User = Depends(get_current_user),
) -> User:
if not current_user.is_superuser:
raise HTTPException(
status_code=status.HTTP_403_FORBIDDEN,
detail="Not enough privileges",
)
return current_user