From f6df5e1942e296a2d0bbf6b744408cff16380b36 Mon Sep 17 00:00:00 2001 From: Solomon Negusse Date: Fri, 10 May 2024 18:57:18 +0300 Subject: [PATCH] fix data manager logic --- app/authentication/token.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/authentication/token.py b/app/authentication/token.py index 2e7163211..3b164543b 100644 --- a/app/authentication/token.py +++ b/app/authentication/token.py @@ -113,7 +113,7 @@ async def get_manager(user: User = Depends(get_user)) -> User: """Get the details for authenticated MANAGER for data-api application or ADMIN user.""" - if user.role != "ADMIN" or user.role != "MANAGER": + if user.role != "ADMIN" and user.role != "MANAGER": raise HTTPException(status_code=401, detail="Unauthorized") return user