diff --git a/backend/dataall/modules/dataset_sharing/services/share_object_service.py b/backend/dataall/modules/dataset_sharing/services/share_object_service.py index 4e822bc53..d6dd11d23 100644 --- a/backend/dataall/modules/dataset_sharing/services/share_object_service.py +++ b/backend/dataall/modules/dataset_sharing/services/share_object_service.py @@ -7,6 +7,7 @@ from dataall.core.permissions.permission_checker import has_resource_permission from dataall.core.tasks.db.task_models import Task from dataall.base.db import utils +from dataall.base.aws.quicksight import QuicksightClient from dataall.base.db.exceptions import UnauthorizedOperation from dataall.modules.dataset_sharing.db.enums import ShareObjectActions, ShareableType, ShareItemStatus, \ ShareObjectStatus, PrincipalType @@ -179,6 +180,13 @@ def submit_share_object(cls, uri: str): message='The request is empty of pending items. Add items to share request.', ) + env = EnvironmentService.get_environment_by_uri(session, share.environmentUri) + dashboard_enabled = EnvironmentService.get_boolean_env_param(session, env, "dashboardsEnabled") + if dashboard_enabled: + share_table_items = ShareObjectRepository.find_all_share_items(session, uri, ShareableType.Table.value) + if share_table_items: + QuicksightClient.check_quicksight_enterprise_subscription(AwsAccountId=env.AwsAccountId) + cls._run_transitions(session, share, states, ShareObjectActions.Submit) ShareNotificationService(