RABC fejlesztése és beélesítése hibák kijavításával
This commit is contained in:
@@ -192,7 +192,7 @@ async def ban_user(
|
||||
)
|
||||
|
||||
# 2. Ellenőrizd, hogy nem superadmin-e
|
||||
if user.role == UserRole.superadmin:
|
||||
if user.role == UserRole.SUPERADMIN:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail="Cannot ban a superadmin user"
|
||||
@@ -698,7 +698,7 @@ async def bulk_user_action(
|
||||
affected_count = 0
|
||||
|
||||
for user in users:
|
||||
if user.role == UserRole.superadmin and user.id != current_admin.id:
|
||||
if user.role == UserRole.SUPERADMIN and user.id != current_admin.id:
|
||||
continue
|
||||
|
||||
if request.action == "ban":
|
||||
|
||||
Reference in New Issue
Block a user