dosubot[bot] commented on issue #32552:
URL: https://github.com/apache/superset/issues/32552#issuecomment-2708896509

   <!-- Greeting -->
   Hey @mostopalove! I'm here to help you with this Superset issue. I'm a bot 
that can assist you with bug fixes, answer questions, and guide you on becoming 
a contributor. Let's tackle this together!
   
   <!-- Answer -->
   To resolve the 403 error in Apache Superset's embedded mode when using the 
Gamma role for a guest user, ensure that the `dashboardID` is included in the 
`form_data` object. The refactored `<Charts/>` component should add the 
`dashboardID` if it is present in the URL parameters. You can achieve this by 
using the `useSelector` function to access `dashboardInfo` and set the 
`dashboardId` in `form_data` as follows:
   
   ```javascript
   const dashboardInfo = useSelector(state => state.dashboardInfo);
   formData.dashboardId = dashboardInfo.id;
   ```
   
   This change ensures that the `dashboardID` is correctly included in the 
`form_data`, which should help resolve the 403 error by allowing the backend to 
recognize the request context properly 
<sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/explore/actions/hydrateExplore.ts)</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/24432e2d-10ff-45d5-9665-7adca359e570?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/24432e2d-10ff-45d5-9665-7adca359e570?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/24432e2d-10ff-45d5-9665-7adca359e570?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/24432e2d-10ff-45d5-9665-7adca359e570?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/24432e2d-10ff-45d5-9665-7adca359e570?feedback_type=hallucination)
 | [Bug 
Report](https://app.dosu.dev/response-feedback/24432e2d-10ff-45d5-9665-7adca359e570?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/24432e2d-10ff-45d5-9665-7adca359e570?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]

Reply via email to