dosubot[bot] commented on issue #34618: URL: https://github.com/apache/superset/issues/34618#issuecomment-3167891275
<!-- Answer --> By default, Superset does not restrict the ability to assign or select roles like "Public"—any user with dashboard editing rights can assign any available role, including "Public", to a dashboard. If you want to restrict certain roles so only administrators can assign or see them, you need to customize your Superset instance. You can do this by using the `EXTRA_RELATED_QUERY_FILTERS` configuration in `superset_config.py` to filter which roles appear in dropdowns (like the dashboard role selection UI) based on the current user's roles or permissions. For more advanced control, you can create a custom `RoleApi` subclass to filter the roles list according to your logic, and register it using `FLASK_APP_MUTATOR` in your config. This way, only admins (or other specified roles) will see or be able to assign sensitive roles like "Public" ([example and details](https://github.com/apache/superset/discussions/33877)). Without these customizations, there is no built-in feature to prevent non-admin users from selecting or assigning specific roles in the UI ([reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx)). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/5b906da5-d839-49c4-ac65-4ea7b804d55f?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5b906da5-d839-49c4-ac65-4ea7b804d55f?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5b906da5-d839-49c4-ac65-4ea7b804d55f?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5b906da5-d839-49c4-ac65-4ea7b804d55f?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5b906da5-d839-49c4-ac65-4ea7b804d55f?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5b906da5-d839-49c4-ac65-4ea7b804d55f?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5b906da5-d839-49c4-ac65-4ea7b804d55f?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/34618) -- 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]
