From 6d336127654f7c3083e5a90c0fa69b1cbde2598e Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Wed, 2 Jul 2025 14:56:57 +0800 Subject: [PATCH] fix: role user permission --- apps/common/auth/handle/impl/user_token.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/common/auth/handle/impl/user_token.py b/apps/common/auth/handle/impl/user_token.py index d876ad346be..71b43d1ee37 100644 --- a/apps/common/auth/handle/impl/user_token.py +++ b/apps/common/auth/handle/impl/user_token.py @@ -229,7 +229,7 @@ def get_permission_list(user, def reset_workspace_role(role_id, workspace_id, role_dict): if system_role_list.__contains__(role_id): if system_role == role_id: - return role_id + return [role_id] else: return [f"{role_id}:/WORKSPACE/{workspace_id}", role_id] else: @@ -238,7 +238,7 @@ def reset_workspace_role(role_id, workspace_id, role_dict): return '' role_type = role_dict.get(role_id).type if system_role == role_type: - return RoleConstants.EXTENDS_ADMIN.value.name + return [RoleConstants.EXTENDS_ADMIN.value.name] return [f"EXTENDS_{role_type}:/WORKSPACE/{workspace_id}", f"EXTENDS_{role_type}"]