From 43a3f90401f5d08493a83cc74ba5f79de84c8b50 Mon Sep 17 00:00:00 2001 From: ytqh Date: Sun, 16 Mar 2025 18:36:40 +0800 Subject: [PATCH] fix end user auth check --- api/controllers/service_api_with_auth/wraps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/controllers/service_api_with_auth/wraps.py b/api/controllers/service_api_with_auth/wraps.py index 753b660d7c..133c1f0d0c 100644 --- a/api/controllers/service_api_with_auth/wraps.py +++ b/api/controllers/service_api_with_auth/wraps.py @@ -66,7 +66,7 @@ def validate_user_token_and_extract_info(view: Optional[Callable] = None): raise Unauthorized("Invalid token: user not found") if account.status != AccountStatus.ACTIVE: raise Unauthorized("Invalid token: account is not active") - if account.current_role != TenantAccountJoinRole.END_USER: + if account.current_role != TenantAccountJoinRole.END_USER.value: raise Unauthorized("Invalid token: account is not end user") app_id = request.headers.get("X-App-Id")