dosubot[bot] commented on issue #32869: URL: https://github.com/apache/superset/issues/32869#issuecomment-2755322956
<!-- Greeting --> Hey @Kranthi32! How's it going? If you need help with a bug, question, or becoming a contributor, I'm here to assist you. <!-- Answer --> I found a similar issue that was resolved, which might help you with the 403 Forbidden error you're encountering. The solution involves ensuring that the `dashboardID` is included in the `form_data` object when accessing the `api/v1/chart/data` endpoint. You can achieve this by adding the following lines of code in your React application: ```javascript const dashboardInfo = useSelector(state => state.dashboardInfo); formData.dashboardId = dashboardInfo.id; ``` This fix addresses the issue where the `dashboardID` was not being included in the `form_data` object after the `<Charts/>` component refactor, which caused permission errors <sup>[[1]](https://github.com/apache/superset/issues/32552)</sup>. Additionally, ensure that your CORS configuration is correctly set up to allow requests from the domain of your React application. You have already enabled CORS and specified the allowed origins, which is a good step. Make sure that the `ENABLE_CORS` and `ALLOW_CORS` settings are correctly configured in your `superset_config.py` file <sup>[[2]](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-demo/storybook/shared/components/VerifyCORS.tsx)</sup>. Lastly, verify that the "Gamma" role has all the required permissions to access the necessary Superset API functions. The permissions needed are: - `can_csv` on `Superset` - `can_dashboard` on `Superset` - `can_explore` on `Superset` - `can_share_chart` on `Superset` - `can_share_dashboard` on `Superset` - `can_explore_json` on `Superset` - `can_userinfo` on `UserDBModelView` - `can_view_chart_as_table` on `Dashboard` - `can_view_query` on `Dashboard` <sup>[[3]](https://github.com/apache/superset/blob/master/tests/integration_tests/security_tests.py)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/637bf314-b9c4-4ff8-a4b9-18e7d659a962?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/637bf314-b9c4-4ff8-a4b9-18e7d659a962?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/637bf314-b9c4-4ff8-a4b9-18e7d659a962?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/637bf314-b9c4-4ff8-a4b9-18e7d659a962?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/637bf314-b9c4-4ff8-a4b9-18e7d659a962?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/637bf314-b9c4-4ff8-a4b9-18e7d659a962?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/637bf314-b9c4-4ff8-a4b9-18e7d659a962?feedback_type=other)</sup> -- 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]
