dosubot[bot] commented on issue #31513: URL: https://github.com/apache/superset/issues/31513#issuecomment-2552375084
<!-- Greeting --> Hey @callum-jones19! I'm here to help you with your Superset issue. Let's work together to solve this bug and get everything back on track. <!-- Answer --> The issue you're experiencing is related to how the `<Link>` component from `react-router-dom` handles routing in a Single Page Application (SPA) context. The `<Link>` component is used for client-side navigation and does not inherently perform permission checks. This is because it bypasses the server-side request that would typically enforce these checks when using a standard `<a>` element, which triggers a full page reload and server-side permission validation. In your case, the change in `MessageContent.tsx` from a `<span>` with an `onClick` handler to a `<Link>` component allows users to navigate to the SQLLab page without triggering the server-side permission checks that would normally occur with a full page reload. This is why users without the necessary permissions are able to access the page initially, but encounter errors when the backend refuses to send data. To resolve this, you can consider reverting the `<Link>` component back to a standard `<a>` element, which will ensure that the server-side permission checks are enforced upon navigation. Alternatively, you could implement additional client-side logic to check permissions before allowing navigation via the `<Link>` component. This behavior aligns with the known characteristics of the `<Link>` component in Superset, which is used for internal navigation and does not perform permission checks by itself <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/components/GenericLink/GenericLink.tsx)</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/64d6c23d-2424-412a-80b9-a43a8c1ad172?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/64d6c23d-2424-412a-80b9-a43a8c1ad172?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/64d6c23d-2424-412a-80b9-a43a8c1ad172?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/64d6c23d-2424-412a-80b9-a43a8c1ad172?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/64d6c23d-2424-412a-80b9-a43a8c1ad172?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/64d6c23d-2424-412a-80b9-a43a8c1ad172?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]
