mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 10:32:57 +01:00
fixes from PR review
This commit is contained in:
@@ -119,7 +119,8 @@ def update_user(
|
||||
status_code=status.HTTP_404_NOT_FOUND, detail="User not found"
|
||||
)
|
||||
|
||||
if not db_user.id == request.user.id and request.user.role != Role.ADMIN:
|
||||
# Admin users can edit any user, while other users can only edit self
|
||||
if db_user.id != request.user.id and request.user.role != Role.ADMIN:
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="Forbidden")
|
||||
|
||||
cleaned_data = {}
|
||||
|
||||
Reference in New Issue
Block a user