From 9b9dcd91b066d2a02407ec4163d86c33a6a283e1 Mon Sep 17 00:00:00 2001 From: Madiwka3 Date: Mon, 27 Nov 2023 20:56:47 +0600 Subject: [PATCH] passsword mod3 --- app/apis/v1/route_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/apis/v1/route_user.py b/app/apis/v1/route_user.py index fa70f91..d8d25b7 100644 --- a/app/apis/v1/route_user.py +++ b/app/apis/v1/route_user.py @@ -91,7 +91,7 @@ def update_user( db: Session = Depends(get_db), current_user: User = Depends(get_current_user), ): - if current_user.Role != "Admin" or current_user.id != user_id: + if current_user.Role != "Admin" and current_user.id != user_id: print(current_user.Role, current_user.id, user_id) raise HTTPException( status_code=403, detail="You are not authorized to perform this action"