GitHub user dosubot[bot] added a comment to the discussion: Login redirection does not use subpath prefix
<!-- Answer --> Chart embedding works differently from dashboard embedding in Superset. Dashboards have a dedicated embedded system, but charts rely on the `/explore/` endpoint which has stricter permission requirements. **The likely issue:** The Public role needs additional permissions beyond what dashboards require. Specifically, the `/explore/` endpoint checks for `can_explore` permissions and **datasource-level access** to the chart's underlying dataset [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/views/explore.py#L31-L36) [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/explore/utils.py#L39-L48). **To fix this:** 1. **Use `PUBLIC_ROLE_LIKE = "Gamma"` instead of `"Public"`** — the built-in "Public" role has minimal permissions that may not include explore access. "Gamma" includes the necessary `can_explore` and chart-reading permissions [[3]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/tests/integration_tests/security_tests.py#L1519-L1524): ```python AUTH_ROLE_PUBLIC = "Public" PUBLIC_ROLE_LIKE = "Gamma" # Grants explore permissions ``` 2. **Run `superset init`** after changing the config to sync permissions. 3. **Grant the Public role access to the chart's dataset** — even with Gamma-like permissions, you still need to explicitly add the Public role to each dataset the chart uses. Go to **Settings → Datasets**, edit the dataset, and add "Public" to its permissions/roles. 4. **Use this URL format for embedding:** ``` https://localhost/analytics/explore/?slice_id=YOUR_CHART_ID&standalone=true ``` The `standalone=true` parameter hides the navigation chrome but does not bypass auth [[4]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/views/explore.py#L137-L138). **Why dashboards work but charts don't:** Dashboard access only requires `can_read` on Dashboard, while the `/explore/` endpoint additionally requires `can_explore` on the Superset view and explicit datasource access [[5]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/explore/utils.py#L87-L94). If you previously set `PUBLIC_ROLE_LIKE = "Public"`, it likely doesn't include the explore permissions that charts need. **Alternative approach:** If you only need to display chart visualizations publicly, you could create a single-chart dashboard and embed that instead — dashboard embedding is more mature and has fewer permission hurdles. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).* --- Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=a30aae73-fdb2-4dd2-828e-a2522e5c0ad4) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset) GitHub link: https://github.com/apache/superset/discussions/40082#discussioncomment-17300559 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
