dosubot[bot] commented on issue #31339: URL: https://github.com/apache/superset/issues/31339#issuecomment-2525648530
<!-- Answer --> To address the issue where a role has access to the "SWAP DATASET" button in Apache Superset, you need to review the permissions associated with that role. The "SWAP DATASET" button allows users to change the dataset used by a chart, which might not be desirable for all roles. Here are some steps you can take to resolve this: 1. **Review Role Permissions**: Ensure that the role does not have permissions that allow dataset swapping. Check if the role has been granted permissions like `can_write` or other permissions that might implicitly allow dataset modifications. 2. **Dashboard RBAC**: If the **DASHBOARD_RBAC** feature flag is enabled, you can manage which roles can access specific dashboards. This feature allows you to bypass dataset-level checks and control access more granularly. Ensure that the role is configured correctly under this feature if it's enabled <sup>[[1]](https://github.com/apache/superset/blob/master/docs/docs/using-superset/creating-your-first-dashboard.mdx)</sup>. 3. **Dataset Access**: Verify that the role has only the necessary dataset access permissions. If the role has broader access than intended, it might inadvertently allow actions like dataset swapping. 4. **Check for Missing Dataset**: The "Missing dataset" error suggests that the dataset linked to the chart might have been deleted or is inaccessible. Ensure that the dataset exists and that the role has the correct permissions to access it <sup>[[2]](https://github.com/apache/superset/blob/master/docs/docs/security/security.mdx)</sup>. By adjusting the role's permissions and ensuring the dataset is correctly configured and accessible, you should be able to prevent the role from having access to the "SWAP DATASET" button. <!-- 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/41f42167-3ec1-4f60-95dd-276f314a425c?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/41f42167-3ec1-4f60-95dd-276f314a425c?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/41f42167-3ec1-4f60-95dd-276f314a425c?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/41f42167-3ec1-4f60-95dd-276f314a425c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/41f42167-3ec1-4f60-95dd-276f314a425c?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/41f42167-3ec1-4f60-95dd-276f314a425c?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]
