mikebridge commented on code in PR #45067:
URL: https://github.com/apache/superset/pull/45067#discussion_r4235516673
##########
superset/mcp_service/chart/tool/get_chart_data.py:
##########
@@ -547,11 +551,15 @@ async def execute_chart_data( # noqa: C901
)
logger.info("Getting data for chart %s: %s", chart_id, chart_name)
- # Guests skip the RBAC check (authorize_query covers it) but keep the
+ # Table guests skip the RBAC check (authorize_query covers it) but
keep the
# existence check, so a deleted dataset still returns
# DatasetNotAccessible.
- validation_result = validate_chart_dataset(
- chart_datasource_id, check_access=not guest_scope.is_guest_read()
+ validation_result: DatasetValidationResult = (
+ validate_chart_semantic_view(chart_datasource_id)
+ if chart_datasource_type == DatasourceType.SEMANTIC_VIEW.value
+ else validate_chart_dataset(
+ chart_datasource_id, check_access=not
guest_scope.is_guest_read()
+ )
)
Review Comment:
Addressed in 9cfc92340b: guest reads validate the semantic view with
`check_access=False` (existence only), matching the dataset branch. The guest
is still authorized by `ChartDataCommand.validate()` →
`raise_for_access(query_context=...)` with the dashboard context, so this only
removed a false denial.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]