GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management
<!-- Answer --> In Superset 5.0.0, the /api/v1/security/roles/ endpoint is implemented by the RoleRestAPI class in superset/security/api.py, not SupersetRoleApi. If you don't see RoleRestAPI in your codebase, your clone or install may be incompleteāthis class is present in the official 5.0.0 source and is registered as the backend for the roles endpoint [source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/security/api.py). To customize the roles dropdown for tenant filtering, subclass RoleRestAPI and override its get_list method. Register your subclass using appbuilder.add_view_no_menu inside FLASK_APP_MUTATOR in superset_config.py, making sure all imports and registration happen inside the mutator function to avoid Flask context errors. This approach only affects the roles endpoint and is the supported way to implement tenant-based filtering in 5.0.0 [source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/initialization/__init__.py). If RoleRestAPI is missing from your codebase, try re-cloning the repository or use the official release tarball to ensure you have the complete source. <!-- 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/fee0f93f-ebab-457b-bd11-0ffcffee7d87?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/fee0f93f-ebab-457b-bd11-0ffcffee7d87?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/fee0f93f-ebab-457b-bd11-0ffcffee7d87?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/fee0f93f-ebab-457b-bd11-0ffcffee7d87?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/fee0f93f-ebab-457b-bd11-0ffcffee7d87?feedback_type=hallucination) | [Report š](https://app.dosu.dev/response-feedback/fee0f93f-ebab-457b-bd11-0ffcffee7d87?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/fee0f93f-ebab-457b-bd11-0ffcffee7d87?feedback_type=other)</sup> [](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/discussions/33877) GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13679835 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
