From 3a4ae5e37b4ebce9eca26bcf82eba5c8cb3b570d Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 25 Sep 2023 19:12:57 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(users.py):=20prevent=20non-s?= =?UTF-8?q?uperusers=20from=20changing=20their=20password?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/api/v1/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/langflow/api/v1/users.py b/src/backend/langflow/api/v1/users.py index aef639b0a..19aaf81d5 100644 --- a/src/backend/langflow/api/v1/users.py +++ b/src/backend/langflow/api/v1/users.py @@ -99,7 +99,7 @@ def patch_user( raise HTTPException( status_code=403, detail="You don't have the permission to update this user" ) - if user_update.password: + if user_update.password and not user.is_superuser: raise HTTPException( status_code=400, detail="You can't change your password here" )