From 23014be52c74bd7e0249023fa28adaba6bed4144 Mon Sep 17 00:00:00 2001 From: ImMin5 Date: Tue, 7 Jan 2025 18:49:53 +0900 Subject: [PATCH] feat: modify user_projects check logic with wildcard Signed-off-by: ImMin5 --- src/spaceone/core/handler/authorization_handler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/spaceone/core/handler/authorization_handler.py b/src/spaceone/core/handler/authorization_handler.py index 0e0283a..0d6e89a 100644 --- a/src/spaceone/core/handler/authorization_handler.py +++ b/src/spaceone/core/handler/authorization_handler.py @@ -65,5 +65,8 @@ def _check_permissions(user_permissions: list, permission: str): @staticmethod def _check_user_projects(user_projects: list, request_project_id: str) -> None: + if request_project_id == "*": + return + if request_project_id not in user_projects: raise ERROR_PERMISSION_DENIED()