Browse Source

passsword mod2

main
Madiwka3 1 year ago
parent
commit
4ec5541b51
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      app/apis/v1/route_user.py

+ 1
- 0
app/apis/v1/route_user.py View File

@@ -92,6 +92,7 @@ def update_user(
current_user: User = Depends(get_current_user), current_user: User = Depends(get_current_user),
): ):
if current_user.Role != "Admin" or current_user.id != user_id: if current_user.Role != "Admin" or current_user.id != user_id:
print(current_user.Role, current_user.id, user_id)
raise HTTPException( raise HTTPException(
status_code=403, detail="You are not authorized to perform this action" status_code=403, detail="You are not authorized to perform this action"
) )


Loading…
Cancel
Save