From 48dbf6832364382cbd16ef391d6c08925cdd9ed3 Mon Sep 17 00:00:00 2001 From: dlpzx Date: Fri, 22 Nov 2024 12:47:21 +0100 Subject: [PATCH] Add permission check in get_data_filters --- .../dataall/modules/shares_base/services/share_item_service.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/dataall/modules/shares_base/services/share_item_service.py b/backend/dataall/modules/shares_base/services/share_item_service.py index 01f1ddcd0..20081c10a 100644 --- a/backend/dataall/modules/shares_base/services/share_item_service.py +++ b/backend/dataall/modules/shares_base/services/share_item_service.py @@ -258,6 +258,9 @@ def update_filters_table_share_item(uri: str, data: dict): raise ObjectNotFound('ShareObjectItem', uri) @staticmethod + @ResourcePolicyService.has_resource_permission( + GET_SHARE_OBJECT, parent_resource=_get_share_uri_from_item_filter_uri + ) def get_share_item_data_filters(uri: str): with get_context().db_engine.scoped_session() as session: return ShareObjectItemRepository.get_share_item_filter_by_uri(session, uri)