You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sainikhilsamineni (via GitHub)" <gi...@apache.org> on 2025/06/24 06:24:02 UTC

[D] Multi-Tenant User management [superset]

GitHub user sainikhilsamineni created a discussion: Multi-Tenant User management

how can i restrict a user manager  (tenantA-usermanager) to only list users with a particular role (tenantA-user) and able to assign only tenantA-user role when creating new users ? 

GitHub link: https://github.com/apache/superset/discussions/33877

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
To restrict the roles listed in the add/edit user modal so that a user with the "Tenant-manager" role only sees the "Tenant-user" role, you need to override the REST API endpoint that serves roles. In recent Superset versions, this is implemented in the `RoleRestAPI` class in `superset/security/api.py` (not `SupersetRoleApi`, which is for the FAB UI). You should subclass `RoleRestAPI`, override the `get_list` method, and filter the roles based on the current user's roles.

Here's a pattern you can use:

```python
# In your custom module, e.g., custom_role_api.py

from flask import g
from superset.security.api import RoleRestAPI
from superset.extensions import security_manager
from superset.models.core import db
from sqlalchemy.orm import joinedload

class TenantRoleRestAPI(RoleRestAPI):
    def get_list(self, **kwargs):
        # Get current user's roles
        user_roles = [role.name for role in security_manager.get_user_roles(g.user)]
        query = db.session.query(self.datamodel.obj).options(
            joinedload("permissions"), joinedload("user")
        )
        # If user is a Tenant-manager, restrict to Tenant-user role
        if "Tenant-manager" in user_roles:
            query = query.filter(self.datamodel.obj.name == "Tenant-user")
        # You can add more logic for multi-tenant scenarios here
        # Continue with the original logic (pagination, etc.)
        # ... (copy the rest of RoleRestAPI.get_list logic here)
        return super().get_list(**kwargs)
```

To activate your override, register your custom API instead of the default one. The cleanest way is to monkey-patch the registration in your `superset_config.py` using the `FLASK_APP_MUTATOR` config, or by editing the `SupersetAppInitializer.init_views` to use your class instead of `RoleRestAPI` ([see registration pattern](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/initialization/__init__.py#L180-L200)).

Access the current user with `g.user` and their roles with `security_manager.get_user_roles(g.user)` ([reference](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/security/manager.py#L1230-L1237)). This ensures only the allowed roles are returned to the frontend, regardless of what the UI requests.

After making these changes, restart Superset and verify by logging in as a Tenant-manager and opening the add/edit user modal—the dropdown should only show the Tenant-user role.

Keep in mind: you’ll need to maintain this override across upgrades, and you should test thoroughly to ensure no privilege escalation is possible. If you want to restrict the old FAB UI as well, you’d also subclass `SupersetRoleApi` in `superset/security/manager.py` and register it in your custom security manager.


<!-- 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/dd3f15f5-b5f8-4846-966c-e765e73e4a70?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/dd3f15f5-b5f8-4846-966c-e765e73e4a70?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/dd3f15f5-b5f8-4846-966c-e765e73e4a70?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/dd3f15f5-b5f8-4846-966c-e765e73e4a70?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/dd3f15f5-b5f8-4846-966c-e765e73e4a70?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/dd3f15f5-b5f8-4846-966c-e765e73e4a70?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/dd3f15f5-b5f8-4846-966c-e765e73e4a70?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13636687

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu i can guarentee you that UserApi and RoleApi of flask-appbuilder are the ones getting used when FAB_ADD_SECURITY_API is enabled. i checked it by printing obj type names at runtime. i even checked the official docker image of apache superset's container inside code. there are no RoleRestAPI or SupersetRoleApi implemented

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13680068

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu i have successfully setup user listing restriction by extending SupersetSecurityManager user view and registering it in superset_config.py . But when i turn 'FAB_ADD_SECURITY_API' to true why is it getting back to listing all users ?

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13679414

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu i want to introduce a new parameter called tenantID and make combination of username and tenantID unique instead of just the username. login form would be same because i'll take tenantID from login url. Every set of tenant users will be having seperate login urls which all are mapped to same superset instance

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13760463

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu please show me how to override role listing dropdown without disrupting other apis working with FAB_ADD_SECURITY_API being enabled ?

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13679544

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
When you enable `FAB_ADD_SECURITY_API`, Superset switches user listing to the Flask AppBuilder (FAB) Security REST API, which does not use any custom query restrictions or filters you set up in your custom `SupersetSecurityManager` user view. This means any tenant-based filtering you implemented for the UI is bypassed, and the API returns all users to anyone with access to the endpoint. This is by design: the FAB API is a separate code path and doesn't call your custom view logic or filters, so your restrictions are ignored in this mode [reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/security/manager.py).

To enforce tenant-based user listing even when `FAB_ADD_SECURITY_API` is enabled, you need to subclass the relevant FAB API (usually `SupersetUserApi` or `UserApi`), override its list logic to apply your filters, and register your custom API using `FLASK_APP_MUTATOR` after app initialization. This ensures your restrictions apply to both the UI and the API. There are no built-in hooks for this—you must implement and maintain the override yourself [reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/views/users/api.py).

Let me know if you want a code outline for this pattern.


<!-- 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/8f15d36f-7cac-4f23-bc2d-cee4b63c9117?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/8f15d36f-7cac-4f23-bc2d-cee4b63c9117?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/8f15d36f-7cac-4f23-bc2d-cee4b63c9117?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/8f15d36f-7cac-4f23-bc2d-cee4b63c9117?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8f15d36f-7cac-4f23-bc2d-cee4b63c9117?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/8f15d36f-7cac-4f23-bc2d-cee4b63c9117?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8f15d36f-7cac-4f23-bc2d-cee4b63c9117?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13679475

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu can you tell me how can i apply time-zone according to locality of the users in the dashboards x-axis as i am using line charts to visualize time-series data ? and are there any other charts supporting this feature for time-series data ? can echarts customisiation help ?

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13731359

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
Correct—add_form_query_rel_fields and edit_form_query_rel_fields are static and set at class definition time, so they can't access user context (g.user) or anything from the current request. This is a limitation of Flask AppBuilder's design: those hooks are not evaluated per-request, so dynamic filtering based on the logged-in user isn't possible there [source].

If you need per-user filtering (like showing only certain roles in the dropdown based on the current user), the supported way is to subclass FAB's RoleApi, override its list method, and apply your filtering logic using g.user. Then register your custom API in FLASK_APP_MUTATOR. This approach gives you full access to user context and works reliably for tenant-based filtering. There are no documented workarounds for injecting user context into those field hooks.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=e0f68223-63cb-4f6b-94c5-48b85baf6e4d) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwOTlWODMuNTc5MkMzLjU4NTU3IDg0Ljc1NDIgNC45ODU2MyA4NS4zNjUyIDUuODQ3MDUg
 ODQuNTY2TDE5LjYyOTYgNzEuNzgwMSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjQyODQ0IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz48bWFzayBpZD0iZG9zdS1kLWN1dG91dCIgZmlsbD0id2hpdGUiPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDAuNzA0IDAuNTE4MDY2SDE3LjA0MzlWNzYuMjIyMUg0MC43MDRINDIuNTgwNUg0Ny44MDEzQzY4LjcwNjQgNzYuMjIyMSA4NS42NTMzIDU5LjI3NTIgODUuNjUzMyAzOC4zNzAxQzg1LjY1MzMgMTcuNDY1IDY4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LjgwMTMgNy42MTUzMkM2NC43ODY2IDcuNjE1MzIgNzguNTU2IDIxLjM4NDcgNzguNTU2IDM4LjM3MDFIOTIuNzUwNUM5Mi43NTA1IDEzLjU0NTMgNzIuNjI2IC02LjU3OTE5IDQ3LjgwMTMgLTYuNTc5MTlWNy42MTUzMlpNNDIuNTgwNSA3LjYxNTMySDQ3LjgwMTNWLTYuNTc5MTlINDIuNTgwNVY3LjYxNTMyWk00MC43MDQgNy42MTUzMkg0Mi41ODA1Vi02LjU3OTE5SDQwLjcwNFY3LjYxNTMyWiIgZmlsbD0iYmxhY2siIG1hc2s9InVybCgjZG9zdS1kLWN1dG91dCkiLz48cGF0aCBkPSJNNjguOTIxNSAzNi4wMTM1QzY4LjkyMTUgMzYuMDEzNSA2NS43MzY5IDQ5LjQ3MzggNTEuNDIzMSA0OS40NzM4QzM3LjEwOTMgNDkuNDczOCAzMi41Nzg3IDM3LjM1OTYgMzIuNTc4NyAzNi4wMTM1IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjcuNjkxNjEi
 IHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13691095

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
The error means your Superset environment can't find the RoleRestAPI class in superset/security/api.py. In both 5.0.0 and 54.1.2, RoleRestAPI should be present and is responsible for the /api/v1/security/roles/ endpoint ([source](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/security/api.py)). If it's missing, your installation might be corrupted, incomplete, or using a custom/modified codebase.

Please check your superset/security/api.py file and confirm if RoleRestAPI is defined there. If not, try reinstalling Superset or restoring the correct version of that file. Once RoleRestAPI is present, you can subclass and override it as planned for tenant-based filtering. If your file is custom or patched, you’ll need to adapt your override to match the actual implementation of the /api/v1/security/roles/ endpoint in your environment.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=69b02d45-fcf5-46e4-94df-a9674cd67cf5) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwOTlWODMuNTc5MkMzLjU4NTU3IDg0Ljc1NDIgNC45ODU2MyA4NS4zNjUyIDUuODQ3MDUg
 ODQuNTY2TDE5LjYyOTYgNzEuNzgwMSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjQyODQ0IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz48bWFzayBpZD0iZG9zdS1kLWN1dG91dCIgZmlsbD0id2hpdGUiPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDAuNzA0IDAuNTE4MDY2SDE3LjA0MzlWNzYuMjIyMUg0MC43MDRINDIuNTgwNUg0Ny44MDEzQzY4LjcwNjQgNzYuMjIyMSA4NS42NTMzIDU5LjI3NTIgODUuNjUzMyAzOC4zNzAxQzg1LjY1MzMgMTc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NTZaTTQ3LjgwMTMgNy42MTUzMkM2NC43ODY2IDcuNjE1MzIgNzguNTU2IDIxLjM4NDcgNzguNTU2IDM4LjM3MDFIOTIuNzUwNUM5Mi43NTA1IDEzLjU0NTMgNzIuNjI2IC02LjU3OTE5IDQ3LjgwMTMgLTYuNTc5MTlWNy42MTUzMlpNNDIuNTgwNSA3LjYxNTMySDQ3LjgwMTNWLTYuNTc5MTlINDIuNTgwNVY3LjYxNTMyWk00MC43MDQgNy42MTUzMkg0Mi41ODA1Vi02LjU3OTE5SDQwLjcwNFY3LjYxNTMyWiIgZmlsbD0iYmxhY2siIG1hc2s9InVybCgjZG9zdS1kLWN1dG91dCkiLz48cGF0aCBkPSJNNjguOTIxNSAzNi4wMTM1QzY4LjkyMTUgMzYuMDEzNSA2NS43MzY5IDQ5LjQ3MzggNTEuNDIzMSA0OS40NzM4QzM3LjEwOTMgNDkuNDczOCAzMi41Nzg3IDM3LjM1OTYgMzIuNTc4NyAzNi4wMTM1IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjcuNjkxNjEi
 IHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13637372

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

oaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]                                           
superset_init         | 2025-07-02 06:28:06,015:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
superset_init         | 2025-07-02 06:28:06,678:ERROR:superset.app:Failed to create app
superset_init         | Traceback (most recent call last):
superset_init         |   File "/app/superset/app.py", line 40, in create_app                                                                        
superset_init         |     app_initializer.init_app()                                                                                               
superset_init         |   File "/app/superset/initialization/__init__.py", line 489, in init_app                                                     
superset_init         |     self.init_app_in_ctx()                                                                                                   
superset_init         |   File "/app/superset/initialization/__init__.py", line 424, in init_app_in_ctx                                              
superset_init         |     flask_app_mutator(self.superset_app)                                                                                     
superset_init         |   File "/app/docker/pythonpath_dev/superset_config.py", line 47, in flask_app_mutator
superset_init         |     configure_custom_role_api(app)                                                                                           
superset_init         |   File "/app/docker/pythonpath_dev/superset_config.py", line 34, in configure_custom_role_api                                
superset_init         |     from custom_manager import TenantRoleRestAPI                                                                             
superset_init         |   File "/app/docker/pythonpath_dev/custom_manager.py", line 2, in <module>                                                   
superset_init         |     from superset.security.api import RoleRestAPI                                                                            
superset_init         | ImportError: cannot import name 'RoleRestAPI' from 'superset.security.api' (/app/superset/security/api.py)                   
superset_init         | Traceback (most recent call last):                                                                                           
superset_init         |   File "/usr/local/bin/superset", line 8, in <module>
superset_init         |     sys.exit(superset())                                                                                                     
superset_init         |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__                                       
superset_init         |     return self.main(*args, **kwargs)                                                                                        
superset_init         |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main                                           
superset_init         |     rv = self.invoke(ctx)                                                                                                    
superset_init         |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1685, in invoke
superset_init         |     super().invoke(ctx)                                                                                                      
superset_init         |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke                                         
superset_init         |     return ctx.invoke(self.callback, **ctx.params)                                                                           
superset_init         |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke                                          
superset_init         |     return __callback(*args, **kwargs)
superset_init         |   File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func                                   
superset_init         |     return f(get_current_context(), *args, **kwargs)                                                                         
superset_init         |   File "/usr/local/lib/python3.10/site-packages/flask/cli.py", line 355, in decorator                                        
superset_init         |     app = __ctx.ensure_object(ScriptInfo).load_app()                                                                         
superset_init         |   File "/usr/local/lib/python3.10/site-packages/flask/cli.py", line 309, in load_app
superset_init         |     app = locate_app(import_name, name)                                                                                      
superset_init         |   File "/usr/local/lib/python3.10/site-packages/flask/cli.py", line 238, in locate_app                                       
superset_init         |     return find_app_by_string(module, app_name)                                                                              
superset_init         |   File "/usr/local/lib/python3.10/site-packages/flask/cli.py", line 166, in find_app_by_string                               
superset_init         |     app = attr(*args, **kwargs)                                                                                              
superset_init         |   File "/app/superset/app.py", line 40, in create_app
superset_init         |     app_initializer.init_app()                                                                                               
superset_init         |   File "/app/superset/initialization/__init__.py", line 489, in init_app                                                     
superset_init         |     self.init_app_in_ctx()                                                                                                   
superset_init         |   File "/app/superset/initialization/__init__.py", line 424, in init_app_in_ctx                                              
superset_init         |     flask_app_mutator(self.superset_app)
superset_init         |   File "/app/docker/pythonpath_dev/superset_config.py", line 47, in flask_app_mutator                                        
superset_init         |     configure_custom_role_api(app)                                                                                           
superset_init         |   File "/app/docker/pythonpath_dev/superset_config.py", line 34, in configure_custom_role_api                                
superset_init         |     from custom_manager import TenantRoleRestAPI                                                                             
superset_init         |   File "/app/docker/pythonpath_dev/custom_manager.py", line 2, in <module>
superset_init         |     from superset.security.api import RoleRestAPI                                                                            
superset_init         | ImportError: cannot import name 'RoleRestAPI' from 'superset.security.api' (/app/superset/security/api.py) 

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13636844

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni deleted a comment on the discussion: Multi-Tenant User management

@dosu please provide the implementation with code .

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13558917

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu RoleRestAPI isnt available in 5.0.0. 

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13679700

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
You're correct—RoleRestAPI is not present in Superset 5.0.0. The /api/v1/security/roles/ endpoint is actually implemented by SupersetRoleApi (a subclass of RoleApi from Flask AppBuilder) in superset/security/manager.py when FAB_ADD_SECURITY_API is enabled. To customize the roles dropdown for tenant-based filtering, subclass SupersetRoleApi and override its list method with your filtering logic. Register your custom API in FLASK_APP_MUTATOR inside superset_config.py to ensure it only affects the roles endpoint and not other APIs. This is the supported and upgrade-friendly way to achieve your goal in 5.0.0. 

Let me know if you want a code outline for this pattern.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=d736aa7e-8db9-48f5-943e-c5457847cde1) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDcz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SA2NS43MzY5IDQ5LjQ3MzggNTEuNDIzMSA0OS40NzM4QzM3LjEwOTMgNDkuNDczOCAzMi41Nzg3IDM3LjM1OTYgMzIuNTc4NyAzNi4wMTM1IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjcuNjkxNjEi
 IHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13679725

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
Yes, it's the same with base_filters—they are static class attributes and can't access user context (like g.user) for dynamic, per-request filtering. If you need tenant-aware or user-specific filtering, you have to subclass the relevant API (like RoleApi), override its list method, and apply your filtering logic there using g.user or security_manager.get_user_roles(g.user). There’s no way to make base_filters dynamic per request in Flask AppBuilder or Superset—dynamic logic must go in the API method or a custom filter class that reads from the request context.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=77663b8c-710f-453c-ae8f-78560fda0053) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHB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d2lkdGg9IjcuNjkxNjEi
 IHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13715502

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu new error

Found but failed to import local superset_config
superset_init         | Traceback (most recent call last):
superset_init         |   File "/app/superset/config.py", line 1955, in <module>
superset_init         |     import superset_config
superset_init         |   File "/app/docker/pythonpath_dev/superset_config.py", line 32, in <module>
superset_init         |     from custom_role_api import TenantRoleRestAPI  # noqa: E402
superset_init         |   File "/app/docker/pythonpath_dev/custom_role_api.py", line 2, in <module>
superset_init         |     from superset.security.api import RoleRestAPI
superset_init         |   File "/app/superset/security/api.py", line 33, in <module>
superset_init         |     from superset.views.base_api import BaseSupersetApi, statsd_metrics
superset_init         |   File "/app/superset/views/__init__.py", line 17, in <module>
superset_init         |     from . import (
superset_init         |   File "/app/superset/views/alerts.py", line 25, in <module>
superset_init         |     from .base import BaseSupersetView
superset_init         |   File "/app/superset/views/base.py", line 57, in <module>
superset_init         |     from superset.connectors.sqla import models
superset_init         |   File "/app/superset/connectors/sqla/__init__.py", line 17, in <module>
superset_init         |     from . import models, views  # noqa: F401
superset_init         |   File "/app/superset/connectors/sqla/models.py", line 76, in <module>
superset_init         |     from superset.connectors.sqla.utils import (
superset_init         |   File "/app/superset/connectors/sqla/utils.py", line 39, in <module>
superset_init         |     from superset.models.core import Database
superset_init         |   File "/app/superset/models/__init__.py", line 17, in <module>
superset_init         |     from . import core, dynamic_plugins, sql_lab, user_attributes  # noqa: F401
superset_init         |   File "/app/superset/models/core.py", line 75, in <module>
superset_init         |     from superset.models.helpers import AuditMixinNullable, ImportExportMixin, UUIDMixin
superset_init         |   File "/app/superset/models/helpers.py", line 104, in <module>
superset_init         |     config = app.config
superset_init         |   File "/app/.venv/lib/python3.10/site-packages/werkzeug/local.py", line 318, in __get__
superset_init         |     obj = instance._get_current_object()
superset_init         |   File "/app/.venv/lib/python3.10/site-packages/werkzeug/local.py", line 519, in _get_current_object
superset_init         |     raise RuntimeError(unbound_message) from None
superset_init         | RuntimeError: Working outside of application context.
superset_init         |
superset_init         | This typically means that you attempted to use functionality that needed
superset_init         | the current application. To solve this, set up an application context
superset_init         | with app.app_context(). See the documentation for more information.
superset_init         | Traceback (most recent call last):                                                                                                                                                                                                            
superset_init         |   File "/app/.venv/bin/superset", line 4, in <module>
superset_init         |     from superset.cli.main import superset                                                                                                                                                                                                    
superset_init         |   File "/app/superset/cli/main.py", line 28, in <module>                                                                                                                                                                                      
superset_init         |     from superset.cli.lib import normalize_token
superset_init         |   File "/app/superset/cli/lib.py", line 20, in <module>                                                                                                                                                                                       
superset_init         |     from superset import config
superset_init         |   File "/app/superset/config.py", line 1955, in <module>                                                                                                                                                                                      
superset_init         |     import superset_config
superset_init         |   File "/app/docker/pythonpath_dev/superset_config.py", line 32, in <module>                                                                                                                                                                  
superset_init         |     from custom_role_api import TenantRoleRestAPI  # noqa: E402
superset_init         |   File "/app/docker/pythonpath_dev/custom_role_api.py", line 2, in <module>                                                                                                                                                                   
superset_init         |     from superset.security.api import RoleRestAPI
superset_init         |   File "/app/superset/security/api.py", line 33, in <module>                                                                                                                                                                                  
superset_init         |     from superset.views.base_api import BaseSupersetApi, statsd_metrics                                                                                                                                                                       
superset_init         |   File "/app/superset/views/__init__.py", line 17, in <module>
superset_init         |     from . import (                                                                                                                                                                                                                           
superset_init         |   File "/app/superset/views/alerts.py", line 25, in <module>
superset_init         |     from .base import BaseSupersetView                                                                                                                                                                                                        
superset_init         |   File "/app/superset/views/base.py", line 57, in <module>
superset_init         |     from superset.connectors.sqla import models                                                                                                                                                                                               
superset_init         |   File "/app/superset/connectors/sqla/__init__.py", line 17, in <module>
superset_init         |     from . import models, views  # noqa: F401                                                                                                                                                                                                 
superset_init         |   File "/app/superset/connectors/sqla/models.py", line 76, in <module>
superset_init         |     from superset.connectors.sqla.utils import (                                                                                                                                                                                              
superset_init         |   File "/app/superset/connectors/sqla/utils.py", line 39, in <module>
superset_init         |     from superset.models.core import Database                                                                                                                                                                                                 
superset_init         |   File "/app/superset/models/__init__.py", line 17, in <module>                                                                                                                                                                               
superset_init         |     from . import core, dynamic_plugins, sql_lab, user_attributes  # noqa: F401
superset_init         |   File "/app/superset/models/core.py", line 75, in <module>                                                                                                                                                                                   
superset_init         |     from superset.models.helpers import AuditMixinNullable, ImportExportMixin, UUIDMixin
superset_init         |   File "/app/superset/models/helpers.py", line 104, in <module>                                                                                                                                                                               
superset_init         |     config = app.config
superset_init         |   File "/app/.venv/lib/python3.10/site-packages/werkzeug/local.py", line 318, in __get__                                                                                                                                                      
superset_init         |     obj = instance._get_current_object()                                                                                                                                                                                                      
superset_init         |   File "/app/.venv/lib/python3.10/site-packages/werkzeug/local.py", line 519, in _get_current_object
superset_init         |     raise RuntimeError(unbound_message) from None                                                                                                                                                                                             
superset_init         | RuntimeError: Working outside of application context.
superset_init         |                                                                                                                                                                                                                                               
superset_init         | This typically means that you attempted to use functionality that needed
superset_init         | the current application. To solve this, set up an application context                                                                                                                                                                         
superset_init         | with app.app_context(). See the documentation for more information.

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13637457

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Greeting -->
Hi @sainikhilsamineni! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team.

<!-- Answer -->
Superset doesn't have a built-in setting for tenant-based user management or restricting role assignments to specific user managers, but you can achieve this with some backend customization.

You can use the CUSTOM_SECURITY_MANAGER config option to define your own security manager class, extending SupersetSecurityManager. In this class, you can override user listing and role assignment logic to enforce that a user manager (like tenantA-usermanager) only sees users with a specific role (like tenantA-user) and can only assign that role when creating new users. See the SupersetSecurityManager implementation for reference on where to hook your logic in: [superset/security/manager.py](https://github.com/apache/superset/blob/98b35125c2a562bb2a61a26e6acd3430339320aa/superset/security/manager.py).

For filtering which users and roles appear in the UI, you can use the EXTRA_RELATED_QUERY_FILTERS config in your superset_config.py. For example, you can provide a custom filter function for the "user" and "role" keys to only show users or roles matching your tenant's criteria. Example and details are in [superset/config.py](https://github.com/apache/superset/blob/98b35125c2a562bb2a61a26e6acd3430339320aa/superset/config.py).

Keep in mind: these filters affect what appears in the UI, but for robust security, you should enforce restrictions in your custom security manager as well, since the frontend only reflects backend output.

There isn't official documentation or out-of-the-box support for this use case, so some Python development is required to implement and maintain these customizations.


<!-- 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/cdb205ac-bc02-468d-9fa7-3ccbb2c33ac5?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/cdb205ac-bc02-468d-9fa7-3ccbb2c33ac5?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/cdb205ac-bc02-468d-9fa7-3ccbb2c33ac5?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/cdb205ac-bc02-468d-9fa7-3ccbb2c33ac5?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/cdb205ac-bc02-468d-9fa7-3ccbb2c33ac5?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/cdb205ac-bc02-468d-9fa7-3ccbb2c33ac5?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/cdb205ac-bc02-468d-9fa7-3ccbb2c33ac5?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13558097

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

is there a feature in superset such that when a new user gets added via api or ui he gets a mail (provided while adding) of configured credentials or password reset ? If there is one will it gets effected when email uniqueness is removed to provision multiple users with same email addresses ?

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13731148

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
Yes, it's the same with base_filters—they are static class attributes and can't access user context (like g.user) for dynamic, per-request filtering. If you need tenant-aware or user-specific filtering, you have to subclass the relevant API (like RoleApi), override its list method, and apply your filtering logic there using g.user or security_manager.get_user_roles(g.user). There’s no way to make base_filters dynamic per request in Flask AppBuilder or Superset—dynamic logic must go in the API method or a custom filter class that reads from the request context.


<!-- 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/77663b8c-710f-453c-ae8f-78560fda0053?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/77663b8c-710f-453c-ae8f-78560fda0053?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/77663b8c-710f-453c-ae8f-78560fda0053?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/77663b8c-710f-453c-ae8f-78560fda0053?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/77663b8c-710f-453c-ae8f-78560fda0053?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/77663b8c-710f-453c-ae8f-78560fda0053?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/77663b8c-710f-453c-ae8f-78560fda0053?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13715502

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
To restrict the roles listed in the add/edit user modal so that a user with the "Tenant-manager" role only sees the "Tenant-user" role, you need to override the REST API endpoint that serves roles. In recent Superset versions, this is implemented in the `RoleRestAPI` class in `superset/security/api.py` (not `SupersetRoleApi`, which is for the FAB UI). You should subclass `RoleRestAPI`, override the `get_list` method, and filter the roles based on the current user's roles.

Here's a pattern you can use:

```python
# In your custom module, e.g., custom_role_api.py

from flask import g
from superset.security.api import RoleRestAPI
from superset.extensions import security_manager
from superset.models.core import db
from sqlalchemy.orm import joinedload

class TenantRoleRestAPI(RoleRestAPI):
    def get_list(self, **kwargs):
        # Get current user's roles
        user_roles = [role.name for role in security_manager.get_user_roles(g.user)]
        query = db.session.query(self.datamodel.obj).options(
            joinedload("permissions"), joinedload("user")
        )
        # If user is a Tenant-manager, restrict to Tenant-user role
        if "Tenant-manager" in user_roles:
            query = query.filter(self.datamodel.obj.name == "Tenant-user")
        # You can add more logic for multi-tenant scenarios here
        # Continue with the original logic (pagination, etc.)
        # ... (copy the rest of RoleRestAPI.get_list logic here)
        return super().get_list(**kwargs)
```

To activate your override, register your custom API instead of the default one. The cleanest way is to monkey-patch the registration in your `superset_config.py` using the `FLASK_APP_MUTATOR` config, or by editing the `SupersetAppInitializer.init_views` to use your class instead of `RoleRestAPI` ([see registration pattern](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/initialization/__init__.py#L180-L200)).

Access the current user with `g.user` and their roles with `security_manager.get_user_roles(g.user)` ([reference](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/security/manager.py#L1230-L1237)). This ensures only the allowed roles are returned to the frontend, regardless of what the UI requests.

After making these changes, restart Superset and verify by logging in as a Tenant-manager and opening the add/edit user modal—the dropdown should only show the Tenant-user role.

Keep in mind: you’ll need to maintain this override across upgrades, and you should test thoroughly to ensure no privilege escalation is possible. If you want to restrict the old FAB UI as well, you’d also subclass `SupersetRoleApi` in `superset/security/manager.py` and register it in your custom security manager.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=dd3f15f5-b5f8-4846-966c-e765e73e4a70) [![Learn about superset with Dosu](https://img.shields.io/badge/Learn%20about%20superset%20with%20Dosu-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIge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MTlINDIuNTgwNVY3LjYxNTMyWk00MC43MDQgNy42MTUzMkg0Mi41ODA1Vi02LjU3OTE5SDQwLjcwNFY3LjYxNTMyWiIgZmlsbD0iYmxhY2siIG1hc2s9InVybCgjZG9zdS1kLWN1dG91dCkiLz48cGF0aCBkPSJNNjguOTIxNSAzNi4wMTM1QzY4LjkyMTUgMzYuMDEzNSA2NS43MzY5IDQ5LjQ3MzggNTEuNDIzMSA0OS40NzM4QzM3LjEwOTMgNDkuNDczOCAzMi41Nzg3IDM3LjM1OTYgMzIuNTc4NyAzNi4wMTM1IiBzdHJva2U9ImJsYWNrIiB
 zdHJva2Utd2lkdGg9IjcuNjkxNjEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [![Add Dosu to your team](https://img.shields.io/badge/Add%20Dosu%20to%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13636687

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
Superset displays time-series chart x-axes (including line, area, and bar charts) in UTC by default—there’s no built-in per-user time zone support in the dashboard UI or chart controls. All time zone handling is global or dataset-specific, and the frontend always renders timestamps in UTC unless you customize the code [source](https://github.com/apache/superset/issues/33570).

However, ECharts (used for most time-series charts) is flexible and can be customized to display times in a user’s local time zone. Superset’s frontend includes a TimezoneSelector component and uses the dayjs library with timezone support, but these aren’t wired into dashboards or chart controls out of the box [source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/packages/superset-ui-core/src/components/TimezoneSelector/index.tsx).

To implement per-user time zone display, you’d need to: (1) capture the user’s preferred time zone (using TimezoneSelector or another UI), (2) store it (in session, user attribute, etc.), and (3) pass it to the ECharts chart’s transformProps function, where you can use a custom x-axis formatter (with dayjs.tz) to render axis labels in the user’s time zone [source](https://github.com/apache/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts). This approach works for any ECharts-based time-series chart.

There’s no direct way to edit ECharts JSON config in the UI; you’d need to modify the transformProps.ts file for the relevant chart type [source](https://github.com/apache/superset/discussions/31802). Other chart types (like area and bar) use the same ECharts infrastructure and support similar customization.

There are no official plugins or documented best practices for end-to-end per-user time zone handling in Superset dashboards as of now, so this would be a custom frontend extension. The building blocks exist, but you’d need to wire them together in your deployment.


<!-- 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/8af4bb87-33c7-4dd1-b347-4500347890fd?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/8af4bb87-33c7-4dd1-b347-4500347890fd?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/8af4bb87-33c7-4dd1-b347-4500347890fd?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/8af4bb87-33c7-4dd1-b347-4500347890fd?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8af4bb87-33c7-4dd1-b347-4500347890fd?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/8af4bb87-33c7-4dd1-b347-4500347890fd?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8af4bb87-33c7-4dd1-b347-4500347890fd?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13731389

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
You're right—the RoleRestAPI class is not present in superset/security/api.py in recent Superset releases like 5.0.0 and 54.1.2. This is due to a refactor: role management APIs (including the /api/v1/security/roles/ endpoint) have been migrated and are now handled by new classes, such as SupersetRoleApi, which are referenced in superset/security/manager.py. The API structure and registration have changed, but the endpoint for roles still exists—just under a different implementation. This change is part of ongoing efforts to modernize and modularize Superset’s API codebase. If you’re looking for the current implementation, check for SupersetRoleApi or similar classes in the security or manager modules in these releases. 

If you need to customize or extend role management, you’ll want to work with these new classes instead of RoleRestAPI.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=9c045239-2a89-4cfc-8154-44a4dd2cb398) [![Learn about superset with Dosu](https://img.shields.io/badge/Learn%20about%20superset%20with%20Dosu-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwOTlWODMuNTc5MkMzLjU4NTU3IDg0Ljc1NDIgNC4
 5ODU2MyA4NS4zNjUyIDUuODQ3MDUgODQuN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2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [![Add Dosu to your team](https://img.shields.io/badge/Add%20Dosu%20to%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13636553

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on 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?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=fee0f93f-ebab-457b-bd11-0ffcffee7d87) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSI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ImJsYWNrIiBzdHJva2Utd2lkdGg9IjcuNjkxNjEi
 IHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13679835

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
The /api/v1/security/roles/ endpoint is implemented in the RoleRestAPI class in superset/security/api.py. All the logic for listing, filtering, and returning roles is in this class, mainly in the get_list method. The API is registered and exposed via Flask AppBuilder in superset/initialization/__init__.py, which makes it available under /api/v1/security/roles/ as part of the Superset API suite. You can see the implementation details here: [superset/security/api.py (RoleRestAPI)](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/security/api.py).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=860c9ad7-5486-4038-ae0b-89147edcbcf9) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwOTlWODMuNTc5MkMzLjU4NTU3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2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13636235

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
You're right—the RoleRestAPI class is not present in superset/security/api.py in recent Superset releases like 5.0.0 and 54.1.2. This is due to a refactor: role management APIs (including the /api/v1/security/roles/ endpoint) have been migrated and are now handled by new classes, such as SupersetRoleApi, which are referenced in superset/security/manager.py. The API structure and registration have changed, but the endpoint for roles still exists—just under a different implementation. This change is part of ongoing efforts to modernize and modularize Superset’s API codebase. If you’re looking for the current implementation, check for SupersetRoleApi or similar classes in the security or manager modules in these releases. 

If you need to customize or extend role management, you’ll want to work with these new classes instead of RoleRestAPI.


<!-- 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/9c045239-2a89-4cfc-8154-44a4dd2cb398?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/9c045239-2a89-4cfc-8154-44a4dd2cb398?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/9c045239-2a89-4cfc-8154-44a4dd2cb398?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/9c045239-2a89-4cfc-8154-44a4dd2cb398?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9c045239-2a89-4cfc-8154-44a4dd2cb398?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/9c045239-2a89-4cfc-8154-44a4dd2cb398?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/9c045239-2a89-4cfc-8154-44a4dd2cb398?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13636553

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
To override the roles dropdown (used in the add/edit user modal) for tenant-based filtering—without disrupting other APIs and with FAB_ADD_SECURITY_API enabled—subclass the RoleRestAPI and override its get_list method. Register your subclass using FLASK_APP_MUTATOR so it only affects the roles endpoint.

Here’s a pattern you can use (Superset 5.x):

```python
# In custom_role_api.py (do not import this at module level in superset_config.py)
from flask import g
from superset.security.api import RoleRestAPI
from superset.extensions import security_manager
from superset.models.core import db
from sqlalchemy.orm import joinedload

class TenantRoleRestAPI(RoleRestAPI):
    def get_list(self, **kwargs):
        user_roles = [role.name for role in security_manager.get_user_roles(g.user)]
        query = db.session.query(self.datamodel.obj).options(
            joinedload("permissions"), joinedload("user")
        )
        # Example: restrict to "Tenant-user" if current user is "Tenant-manager"
        if "Tenant-manager" in user_roles:
            query = query.filter(self.datamodel.obj.name == "Tenant-user")
        # Continue with original pagination/filter logic
        # ... (copy rest of RoleRestAPI.get_list logic here, using your filtered query)
        # Or call super() if you want to apply additional filters
        return super().get_list(**kwargs)
```

Then, in your `superset_config.py`:

```python
def FLASK_APP_MUTATOR(app):
    from custom_role_api import TenantRoleRestAPI
    appbuilder = app.appbuilder
    # Remove the default RoleRestAPI and register your override
    appbuilder.add_view_no_menu(TenantRoleRestAPI)
```

Make sure all imports and registration happen inside FLASK_APP_MUTATOR, not at the top level, to avoid Flask context errors. This pattern only overrides the roles listing endpoint and leaves other APIs untouched. You can expand the filtering logic for more complex multi-tenant scenarios as needed.

This approach is safe, modular, and upgrade-friendly as long as you keep your override logic in sync with upstream changes to RoleRestAPI.  
[Reference: RoleRestAPI and registration](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/security/api.py) | [App init pattern](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/initialization/__init__.py)


<!-- 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/6286c92d-b1ba-44df-bd3c-fad1d984eb2b?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/6286c92d-b1ba-44df-bd3c-fad1d984eb2b?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/6286c92d-b1ba-44df-bd3c-fad1d984eb2b?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/6286c92d-b1ba-44df-bd3c-fad1d984eb2b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/6286c92d-b1ba-44df-bd3c-fad1d984eb2b?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/6286c92d-b1ba-44df-bd3c-fad1d984eb2b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/6286c92d-b1ba-44df-bd3c-fad1d984eb2b?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13679617

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu how does superset differs working when FAB_ADD_SECURITY_API = True vs not present ?

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13627831

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
The /api/v1/security/* endpoints (like /api/v1/security/roles/) are always present in the codebase, but whether they are actually accessible depends on the FAB_ADD_SECURITY_API flag. When this flag is set to True, these endpoints become active and accessible (with proper permissions), and they also appear in Swagger if FAB_API_SWAGGER_UI is enabled. If the flag is not set or is False, the endpoints still exist in the code, but access is restricted or forbidden—they won’t be usable or visible in Swagger, even though the implementation is the same underneath. The difference is not in the code path or logic of the endpoints themselves, but in whether the API is exposed and permission checks are enforced at a deeper layer, likely within Flask AppBuilder or the permission system. This is confirmed by both the code and integration tests, which use the flag to control endpoint accessibility, not their implementation logic. You need to restart Superset and run superset init after changin
 g this flag for the change to take effect. Only trusted users should have access to these sensitive endpoints.  
[Source 1](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/security/api.py) | [Source 2](https://github.com/apache/superset/issues/33925)


<!-- 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/c714c589-43a6-4957-88f0-90f1be8897c9?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/c714c589-43a6-4957-88f0-90f1be8897c9?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/c714c589-43a6-4957-88f0-90f1be8897c9?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/c714c589-43a6-4957-88f0-90f1be8897c9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c714c589-43a6-4957-88f0-90f1be8897c9?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/c714c589-43a6-4957-88f0-90f1be8897c9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c714c589-43a6-4957-88f0-90f1be8897c9?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13635919

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu same with the base_filters ??

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13715487

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
This happens because the Superset git repository intentionally excludes built frontend assets, generated files, and large dependencies (like superset/static/assets, superset-frontend/build, node_modules, translation files, etc.) via its .gitignore. When you clone and check out a tag, you only get the raw source code, not the production-ready assets or translations needed to run Superset out of the box. Official release tarballs and PyPI packages include these built files because the release process runs all build steps before packaging ([.gitignore](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/.gitignore), [release docs](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/RELEASING/README.md)).

If you want a working Superset from git, after checkout you need to run the frontend and translation build steps (npm/yarn build in superset-frontend, translation scripts, etc.) as described in the development/installation docs. If you want all files prebuilt, use the official release tarball or PyPI package instead.

Also, avoid using git clone --depth=1 if you want to check out tags—shallow clones can miss tags and files ([discussion](https://github.com/apache/superset/issues/33027)).


<!-- 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/f7e7a7c7-3332-41d7-8124-18a3341801ce?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/f7e7a7c7-3332-41d7-8124-18a3341801ce?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/f7e7a7c7-3332-41d7-8124-18a3341801ce?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/f7e7a7c7-3332-41d7-8124-18a3341801ce?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f7e7a7c7-3332-41d7-8124-18a3341801ce?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/f7e7a7c7-3332-41d7-8124-18a3341801ce?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f7e7a7c7-3332-41d7-8124-18a3341801ce?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13639150

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Greeting -->
Hi @sainikhilsamineni! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team.

<!-- Answer -->
Superset doesn't have a built-in setting for tenant-based user management or restricting role assignments to specific user managers, but you can achieve this with some backend customization.

You can use the CUSTOM_SECURITY_MANAGER config option to define your own security manager class, extending SupersetSecurityManager. In this class, you can override user listing and role assignment logic to enforce that a user manager (like tenantA-usermanager) only sees users with a specific role (like tenantA-user) and can only assign that role when creating new users. See the SupersetSecurityManager implementation for reference on where to hook your logic in: [superset/security/manager.py](https://github.com/apache/superset/blob/98b35125c2a562bb2a61a26e6acd3430339320aa/superset/security/manager.py).

For filtering which users and roles appear in the UI, you can use the EXTRA_RELATED_QUERY_FILTERS config in your superset_config.py. For example, you can provide a custom filter function for the "user" and "role" keys to only show users or roles matching your tenant's criteria. Example and details are in [superset/config.py](https://github.com/apache/superset/blob/98b35125c2a562bb2a61a26e6acd3430339320aa/superset/config.py).

Keep in mind: these filters affect what appears in the UI, but for robust security, you should enforce restrictions in your custom security manager as well, since the frontend only reflects backend output.

There isn't official documentation or out-of-the-box support for this use case, so some Python development is required to implement and maintain these customizations.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=cdb205ac-bc02-468d-9fa7-3ccbb2c33ac5) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3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NUM5Mi43NTA1IDEzLjU0NTMgNzIuNjI2IC02LjU3OTE5IDQ3LjgwMTMgLTYuNTc5MTlWNy42MTUzMlpNNDIuNTgwNSA3LjYxNTMySDQ3LjgwMTNWLTYuNTc5MTlINDIuNTgwNVY3LjYxNTMyWk00MC43MDQgNy42MTUzMkg0Mi41ODA1Vi02LjU3OTE5SDQwLjcwNFY3LjYxNTMyWiIgZmlsbD0iYmxhY2siIG1hc2s9InVybCgjZG9zdS1kLWN1dG91dCkiLz48cGF0aCBkPSJNNjguOTIxNSAzNi4wMTM1QzY4LjkyMTUgMzYuMDEzNSA2NS43MzY5IDQ5LjQ3MzggNTEuNDIzMSA0OS40NzM4QzM3LjEwOTMgNDkuNDczOCAzMi41Nzg3IDM3LjM1OTYgMzIuNTc4NyAzNi4wMTM1IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjcuNjkxNjEi
 IHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13558097

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
The /api/v1/security/* endpoints (like /api/v1/security/roles/) are always present in the codebase, but whether they are actually accessible depends on the FAB_ADD_SECURITY_API flag. When this flag is set to True, these endpoints become active and accessible (with proper permissions), and they also appear in Swagger if FAB_API_SWAGGER_UI is enabled. If the flag is not set or is False, the endpoints still exist in the code, but access is restricted or forbidden—they won’t be usable or visible in Swagger, even though the implementation is the same underneath. The difference is not in the code path or logic of the endpoints themselves, but in whether the API is exposed and permission checks are enforced at a deeper layer, likely within Flask AppBuilder or the permission system. This is confirmed by both the code and integration tests, which use the flag to control endpoint accessibility, not their implementation logic. You need to restart Superset and run superset init after changin
 g this flag for the change to take effect. Only trusted users should have access to these sensitive endpoints.  
[Source 1](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/security/api.py) | [Source 2](https://github.com/apache/superset/issues/33925)


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=c714c589-43a6-4957-88f0-90f1be8897c9) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwOTlWODMuNTc5MkMzLjU4NTU3IDg0Ljc1NDIgNC45ODU2MyA4NS4zNjUyIDUuODQ3MDUg
 ODQuNTY2TDE5LjYyOTYgNzEuNzgwMSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjQyODQ0IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz48bWFzayBpZD0iZG9zdS1kLWN1dG91dCIgZmlsbD0id2hpdGUiPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDAuNzA0IDAuNTE4MDY2SDE3LjA0MzlWNzYuMjIyMUg0MC43MDRINDIuNTgwNUg0Ny44MDEzQzY4LjcwNjQgNzYuMjIyMSA4NS42NTMzIDU5LjI3NTIgODU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xOTQ5IDkyLjc1MDUgMzguMzcwMUg3OC41NTZaTTQ3LjgwMTMgNy42MTUzMkM2NC43ODY2IDcuNjE1MzIgNzguNTU2IDIxLjM4NDcgNzguNTU2IDM4LjM3MDFIOTIuNzUwNUM5Mi43NTA1IDEzLjU0NTMgNzIuNjI2IC02LjU3OTE5IDQ3LjgwMTMgLTYuNTc5MTlWNy42MTUzMlpNNDIuNTgwNSA3LjYxNTMySDQ3LjgwMTNWLTYuNTc5MTlINDIuNTgwNVY3LjYxNTMyWk00MC43MDQgNy42MTUzMkg0Mi41ODA1Vi02LjU3OTE5SDQwLjcwNFY3LjYxNTMyWiIgZmlsbD0iYmxhY2siIG1hc2s9InVybCgjZG9zdS1kLWN1dG91dCkiLz48cGF0aCBkPSJNNjguOTIxNSAzNi4wMTM1QzY4LjkyMTUgMzYuMDEzNSA2NS43MzY5IDQ5LjQ3MzggNTEuNDIzMSA0OS40NzM4QzM3LjEwOTMgNDkuNDczOCAzMi41Nzg3IDM3LjM1OTYgMzIuNTc4NyAzNi4wMTM1IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjcuNjkxNjEi
 IHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13635919

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
When FAB_ADD_SECURITY_API = True, Superset enables the Flask AppBuilder (FAB) Security REST API, which exposes endpoints for user and role CRUD operations. This makes additional "Security" endpoints available in the API (and visible in Swagger if you also set FAB_API_SWAGGER_UI = True) for programmatic management of users and roles. These endpoints are not enabled by default and are not available if the flag is absent or set to False. The UI for user/role management is not affected—this flag only controls API/programmatic access, not the regular admin screens or dropdowns in the frontend. Note that these APIs are sensitive, so only trusted users should have access to them. After changing this flag, you need to run superset init and restart the server for it to take effect. More details: [docs](https://github.com/apache/superset/blob/050ccdcb3dd84f3ae6e301d61021e72474e754d7/docs/docs/security/security.mdx), [issue thread](https://github.com/apache/superset/issues/33925), [UPDATING.m
 d](https://github.com/apache/superset/blob/050ccdcb3dd84f3ae6e301d61021e72474e754d7/UPDATING.md).


<!-- 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/fc42a727-6d93-42f4-be77-3b6a106d0ce2?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/fc42a727-6d93-42f4-be77-3b6a106d0ce2?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/fc42a727-6d93-42f4-be77-3b6a106d0ce2?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/fc42a727-6d93-42f4-be77-3b6a106d0ce2?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/fc42a727-6d93-42f4-be77-3b6a106d0ce2?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/fc42a727-6d93-42f4-be77-3b6a106d0ce2?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/fc42a727-6d93-42f4-be77-3b6a106d0ce2?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13627850

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
You're correct—RoleRestAPI is not present in Superset 5.0.0. The /api/v1/security/roles/ endpoint is actually implemented by SupersetRoleApi (a subclass of RoleApi from Flask AppBuilder) in superset/security/manager.py when FAB_ADD_SECURITY_API is enabled. To customize the roles dropdown for tenant-based filtering, subclass SupersetRoleApi and override its list method with your filtering logic. Register your custom API in FLASK_APP_MUTATOR inside superset_config.py to ensure it only affects the roles endpoint and not other APIs. This is the supported and upgrade-friendly way to achieve your goal in 5.0.0. 

Let me know if you want a code outline for this pattern.


<!-- 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/d736aa7e-8db9-48f5-943e-c5457847cde1?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/d736aa7e-8db9-48f5-943e-c5457847cde1?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/d736aa7e-8db9-48f5-943e-c5457847cde1?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/d736aa7e-8db9-48f5-943e-c5457847cde1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d736aa7e-8db9-48f5-943e-c5457847cde1?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/d736aa7e-8db9-48f5-943e-c5457847cde1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d736aa7e-8db9-48f5-943e-c5457847cde1?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13679725

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni edited a comment on the discussion: Multi-Tenant User management

@dosu is there a feature in superset such that when a new user gets added via api or ui he gets a mail (provided while adding) of configured credentials or password reset ? If there is one will it gets effected when email uniqueness is removed to provision multiple users with same email addresses ?

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13731148

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu above error ?

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13637296

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu why isn't my superset doesn't have user profile avatar, so that i can enable user level preference of language and time zone ? or is there any other way to set these preferences ?


GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13718207

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
Superset doesn't have a built-in user profile avatar feature or a UI for user-level language or time zone preferences. The only avatar support is via Slack integration—if you set `SLACK_ENABLE_AVATARS = True` and configure Slack, Superset can fetch avatars from Slack, but there's no UI for users to upload or manage their own avatars, and this is not a general-purpose profile feature ([source](https://github.com/apache/superset/issues/32606)).

Language and time zone settings are global, not per-user. You can enable a language selection dropdown by setting the `LANGUAGES` variable in `superset_config.py`, but this only affects the session and isn't stored as a user preference ([source](https://github.com/apache/superset/discussions/33594)). There's no built-in way for users to set their own time zone—time zone handling is global or dataset-specific.

If you need true user-level preferences (avatar, language, time zone), it would require custom backend and frontend development, possibly extending the `UserAttribute` model and building new UI components ([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/models/user_attributes.py)). There are no official plugins or settings for this today.


<!-- 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/d42df4ef-ef3e-4f55-a8ae-d4198a5ae614?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/d42df4ef-ef3e-4f55-a8ae-d4198a5ae614?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/d42df4ef-ef3e-4f55-a8ae-d4198a5ae614?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/d42df4ef-ef3e-4f55-a8ae-d4198a5ae614?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d42df4ef-ef3e-4f55-a8ae-d4198a5ae614?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/d42df4ef-ef3e-4f55-a8ae-d4198a5ae614?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d42df4ef-ef3e-4f55-a8ae-d4198a5ae614?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13718315

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
The error means your Superset environment can't find the RoleRestAPI class in superset/security/api.py. In both 5.0.0 and 54.1.2, RoleRestAPI should be present and is responsible for the /api/v1/security/roles/ endpoint ([source](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/security/api.py)). If it's missing, your installation might be corrupted, incomplete, or using a custom/modified codebase.

Please check your superset/security/api.py file and confirm if RoleRestAPI is defined there. If not, try reinstalling Superset or restoring the correct version of that file. Once RoleRestAPI is present, you can subclass and override it as planned for tenant-based filtering. If your file is custom or patched, you’ll need to adapt your override to match the actual implementation of the /api/v1/security/roles/ endpoint in your environment.


<!-- 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/69b02d45-fcf5-46e4-94df-a9674cd67cf5?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/69b02d45-fcf5-46e4-94df-a9674cd67cf5?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/69b02d45-fcf5-46e4-94df-a9674cd67cf5?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/69b02d45-fcf5-46e4-94df-a9674cd67cf5?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/69b02d45-fcf5-46e4-94df-a9674cd67cf5?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/69b02d45-fcf5-46e4-94df-a9674cd67cf5?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/69b02d45-fcf5-46e4-94df-a9674cd67cf5?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13637372

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni edited a comment on the discussion: Multi-Tenant User management

@dosu i have successfully setup user listing restriction by extending SupersetSecurityManager user view and registering it in superset_config.py . But when i turn 'FAB_ADD_SECURITY_API' to true why is it getting back to listing all users ? (superset = 5.0.0)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13679414

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
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>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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 notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
Correct—add_form_query_rel_fields and edit_form_query_rel_fields are static and set at class definition time, so they can't access user context (g.user) or anything from the current request. This is a limitation of Flask AppBuilder's design: those hooks are not evaluated per-request, so dynamic filtering based on the logged-in user isn't possible there [source].

If you need per-user filtering (like showing only certain roles in the dropdown based on the current user), the supported way is to subclass FAB's RoleApi, override its list method, and apply your filtering logic using g.user. Then register your custom API in FLASK_APP_MUTATOR. This approach gives you full access to user context and works reliably for tenant-based filtering. There are no documented workarounds for injecting user context into those field hooks.


<!-- 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/e0f68223-63cb-4f6b-94c5-48b85baf6e4d?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/e0f68223-63cb-4f6b-94c5-48b85baf6e4d?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/e0f68223-63cb-4f6b-94c5-48b85baf6e4d?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/e0f68223-63cb-4f6b-94c5-48b85baf6e4d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/e0f68223-63cb-4f6b-94c5-48b85baf6e4d?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/e0f68223-63cb-4f6b-94c5-48b85baf6e4d?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/e0f68223-63cb-4f6b-94c5-48b85baf6e4d?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13691095

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
Yes, the roles dropdown in the add/edit user UI is populated by the `/api/v1/security/roles/` endpoint ([source](https://github.com/apache/superset/blob/050ccdcb3dd84f3ae6e301d61021e72474e754d7/superset-frontend/src/pages/UsersList/index.tsx)). The frontend fetches all roles from this endpoint and passes them to the modal for user creation/editing. 

If you’ve set up query filters in `superset_config.py`, those only affect some UI lists, not the roles shown in the add/edit modal—because the modal fetches directly from the backend API, which by default returns all roles. To restrict which roles appear in the dropdown, you’ll need to enforce filtering at the backend API level (for example, by customizing the RoleRestAPI or your security manager) so that only the allowed roles are returned for the current user ([source](https://github.com/apache/superset/blob/050ccdcb3dd84f3ae6e301d61021e72474e754d7/superset/security/api.py)). There’s no built-in way to restrict assignable roles in the add/edit UI based on the current user’s permissions—this requires backend customization.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=c17dd747-e635-467b-9354-ad5157d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E1MzIgNzguNTU2IDIxLjM4NDcgNzguNTU2IDM4LjM3MDFIOTIuNzUwNUM5Mi43NTA1IDEzLjU0NTMgNzIuNjI2IC02LjU3OTE5IDQ3LjgwMTMgLTYuNTc5MTlWNy42MTUzMlpNNDIuNTgwNSA3LjYxNTMySDQ3LjgwMTNWLTYuNTc5MTlINDIuNTgwNVY3LjYxNTMyWk00MC43MDQgNy42MTUzMkg0Mi41ODA1Vi02LjU3OTE5SDQwLjcwNFY3LjYxNTMyWiIgZmlsbD0iYmxhY2siIG1hc2s9InVybCgjZG9zdS1kLWN1dG91dCkiLz48cGF0aCBkPSJNNjguOTIxNSAzNi4wMTM1QzY4LjkyMTUgMzYuMDEzNSA2NS43MzY5IDQ5LjQ3MzggNTEuNDIzMSA0OS40NzM4QzM3LjEwOTMgNDkuNDczOCAzMi41Nzg3IDM3LjM1OTYgMzIuNTc4NyAzNi4wMTM1IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjcuNjkxNjEi
 IHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13627712

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
When FAB_ADD_SECURITY_API = True, Superset enables the Flask AppBuilder (FAB) Security REST API, which exposes endpoints for user and role CRUD operations. This makes additional "Security" endpoints available in the API (and visible in Swagger if you also set FAB_API_SWAGGER_UI = True) for programmatic management of users and roles. These endpoints are not enabled by default and are not available if the flag is absent or set to False. The UI for user/role management is not affected—this flag only controls API/programmatic access, not the regular admin screens or dropdowns in the frontend. Note that these APIs are sensitive, so only trusted users should have access to them. After changing this flag, you need to run superset init and restart the server for it to take effect. More details: [docs](https://github.com/apache/superset/blob/050ccdcb3dd84f3ae6e301d61021e72474e754d7/docs/docs/security/security.mdx), [issue thread](https://github.com/apache/superset/issues/33925), [UPDATING.m
 d](https://github.com/apache/superset/blob/050ccdcb3dd84f3ae6e301d61021e72474e754d7/UPDATING.md).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=fc42a727-6d93-42f4-be77-3b6a106d0ce2) [![Learn about superset with Dosu](https://img.shields.io/badge/Learn%20about%20superset%20with%20Dosu-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwOTlWODMuNTc5MkMzLjU4NTU3IDg0Ljc1NDIgNC4
 5ODU2MyA4NS4zNjUyIDUuODQ3MDUgODQuNTY2TDE5LjYyOTYgNzEuNzgwMSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjQyODQ0IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz48bWFzayBpZD0iZG9zdS1kLWN1dG91dCIgZmlsbD0id2hpdGUiPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDAuNzA0IDAuNTE4MDY2SDE3LjA0MzlWNzYuMjIyMUg0MC43MDRINDIuNTgwNUg0Ny44MDEzQzY4Ljcw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github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [![Add Dosu to your team](https://img.shields.io/badge/Add%20Dosu%20to%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13627850

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
The roles dropdown in the add/edit user modal is populated using the /api/v1/security/roles/ endpoint, not /api/v1/security/roles/search/. The frontend fetches roles from /api/v1/security/roles/ and passes them to the modal for display—there’s no usage of /search/ for this purpose in the UI code. Both endpoints share backend logic and return similar data, but /api/v1/security/roles/ is the standard and stable API path used for dropdown population in Superset’s user management UI.  
[Source: UsersList component](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset-frontend/src/pages/UsersList/index.tsx)


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=e2599d67-041c-4f91-a704-74879cedf16e) [![Learn about superset with Dosu](https://img.shields.io/badge/Learn%20about%20superset%20with%20Dosu-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwOTlWODMuNTc5MkMzLjU4NTU3IDg0Ljc1NDIgNC4
 5ODU2MyA4NS4zNjUyIDUuODQ3MDUgODQuNTY2TDE5LjYyOTYgNzEuNzgwMSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjQyODQ0IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz48bWFzayBpZD0iZG9zdS1kLWN1dG91dCIgZmlsbD0id2hpdGUiPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDAuNzA0IDAuNTE4MDY2SDE3LjA0MzlWNzYuMjIyMUg0MC43MDRINDIuNTgwNUg0Ny44MDEzQzY4LjcwNjQgNzYuMjIyMSA4NS42NTMzIDU5LjI3NTIgODU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xOTQ5IDkyLjc1MDUgMzguMzcwMUg3OC41NTZaTTQ3LjgwMTMgNy42MTUzMkM2NC43ODY2IDcuNjE1MzIgNzguNTU2IDIxLjM4NDcgNzguNTU2IDM4LjM3MDFIOTIuNzUwNUM5Mi43NTA1IDEzLjU0NTMgNzIuNjI2IC02LjU3OTE5IDQ3LjgwMTMgLTYuNTc5MTlWNy42MTUzMlpNNDIuNTgwNSA3LjYxNTMySDQ3LjgwMTNWLTYuNTc5MTlINDIuNTgwNVY3LjYxNTMyWk00MC43MDQgNy42MTUzMkg0Mi41ODA1Vi02LjU3OTE5SDQwLjcwNFY3LjYxNTMyWiIgZmlsbD0iYmxhY2siIG1hc2s9InVybCgjZG9zdS1kLWN1dG91dCkiLz48cGF0aCBkPSJNNjguOTIxNSAzNi4wMTM1QzY4LjkyMTUgMzYuMDEzNSA2NS43MzY5IDQ5LjQ3MzggNTEuNDIzMSA0OS40NzM4QzM3LjEwOTMgNDkuNDczOCAzMi41Nzg3IDM3LjM1OTYgMzIuNTc4NyAzNi4wMTM1IiBzdHJva2U9ImJsYWNrIiB
 zdHJva2Utd2lkdGg9IjcuNjkxNjEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [![Add Dosu to your team](https://img.shields.io/badge/Add%20Dosu%20to%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13635986

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
You're absolutely right—when FAB_ADD_SECURITY_API is enabled in Superset 5.0.0, the /api/v1/security/users/ and /api/v1/security/roles/ endpoints are handled directly by Flask AppBuilder's UserApi and RoleApi, not by any Superset-specific RoleRestAPI or SupersetRoleApi classes. Superset delegates these endpoints to FAB, and there are no wrappers or hooks in the Superset codebase for these APIs in this mode [reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/security/manager.py).

To implement tenant-based filtering for the roles dropdown, you need to subclass FAB's RoleApi and override its list method. Register your custom subclass using appbuilder.add_api inside the FLASK_APP_MUTATOR function in superset_config.py (all imports and registration must happen inside this function to avoid context errors). Example:

```python
# custom_role_api.py
from flask import g
from flask_appbuilder.security.sqla.apis import RoleApi
from superset.extensions import security_manager

class TenantRoleApi(RoleApi):
    def list(self):
        user_roles = [role.name for role in security_manager.get_user_roles(g.user)]
        # Example: restrict to "Tenant-user" if current user is "Tenant-manager"
        if "Tenant-manager" in user_roles:
            self.datamodel.query = self.datamodel.query.filter_by(name="Tenant-user")
        return super().list()
```

```python
# superset_config.py
def FLASK_APP_MUTATOR(app):
    from custom_role_api import TenantRoleApi
    appbuilder = app.appbuilder
    # Remove the default RoleApi and register your override for the same endpoint
    appbuilder.add_api(TenantRoleApi)
```

This will only affect the /api/v1/security/roles/ endpoint and not disrupt other APIs. Keep your override logic in sync with upstream changes to FAB's RoleApi for future upgrades.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=f6b19a1b-3abc-40fa-a070-4f4f35f76183) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzL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saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13680161

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
When you enable `FAB_ADD_SECURITY_API`, Superset switches user listing to the Flask AppBuilder (FAB) Security REST API, which does not use any custom query restrictions or filters you set up in your custom `SupersetSecurityManager` user view. This means any tenant-based filtering you implemented for the UI is bypassed, and the API returns all users to anyone with access to the endpoint. This is by design: the FAB API is a separate code path and doesn't call your custom view logic or filters, so your restrictions are ignored in this mode [reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/security/manager.py).

To enforce tenant-based user listing even when `FAB_ADD_SECURITY_API` is enabled, you need to subclass the relevant FAB API (usually `SupersetUserApi` or `UserApi`), override its list logic to apply your filters, and register your custom API using `FLASK_APP_MUTATOR` after app initialization. This ensures your restrictions apply to both the UI and the API. There are no built-in hooks for this—you must implement and maintain the override yourself [reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/views/users/api.py).

Let me know if you want a code outline for this pattern.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=8f15d36f-7cac-4f23-bc2d-cee4b63c9117) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOT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43MzY5IDQ5LjQ3MzggNTEuNDIzMSA0OS40NzM4QzM3LjEwOTMgNDkuNDczOCAzMi41Nzg3IDM3LjM1OTYgMzIuNTc4NyAzNi4wMTM1IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjcuNjkxNjEi
 IHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13679475

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu please provide the implementation with code .

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13558917

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu whats "ENABLE_TEMPLATE_PROCESSING" ? Can it help introducing a custom timezone selector to render charts x-axis according to that? If it can does it also adjust the natively available time-range filter ?

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13747809

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu actually SupersetRoleApi is also not available.

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13679750

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
You're absolutely right—when FAB_ADD_SECURITY_API is enabled in Superset 5.0.0, the /api/v1/security/users/ and /api/v1/security/roles/ endpoints are handled directly by Flask AppBuilder's UserApi and RoleApi, not by any Superset-specific RoleRestAPI or SupersetRoleApi classes. Superset delegates these endpoints to FAB, and there are no wrappers or hooks in the Superset codebase for these APIs in this mode [reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/security/manager.py).

To implement tenant-based filtering for the roles dropdown, you need to subclass FAB's RoleApi and override its list method. Register your custom subclass using appbuilder.add_api inside the FLASK_APP_MUTATOR function in superset_config.py (all imports and registration must happen inside this function to avoid context errors). Example:

```python
# custom_role_api.py
from flask import g
from flask_appbuilder.security.sqla.apis import RoleApi
from superset.extensions import security_manager

class TenantRoleApi(RoleApi):
    def list(self):
        user_roles = [role.name for role in security_manager.get_user_roles(g.user)]
        # Example: restrict to "Tenant-user" if current user is "Tenant-manager"
        if "Tenant-manager" in user_roles:
            self.datamodel.query = self.datamodel.query.filter_by(name="Tenant-user")
        return super().list()
```

```python
# superset_config.py
def FLASK_APP_MUTATOR(app):
    from custom_role_api import TenantRoleApi
    appbuilder = app.appbuilder
    # Remove the default RoleApi and register your override for the same endpoint
    appbuilder.add_api(TenantRoleApi)
```

This will only affect the /api/v1/security/roles/ endpoint and not disrupt other APIs. Keep your override logic in sync with upstream changes to FAB's RoleApi for future upgrades.


<!-- 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/f6b19a1b-3abc-40fa-a070-4f4f35f76183?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/f6b19a1b-3abc-40fa-a070-4f4f35f76183?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/f6b19a1b-3abc-40fa-a070-4f4f35f76183?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/f6b19a1b-3abc-40fa-a070-4f4f35f76183?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f6b19a1b-3abc-40fa-a070-4f4f35f76183?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/f6b19a1b-3abc-40fa-a070-4f4f35f76183?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f6b19a1b-3abc-40fa-a070-4f4f35f76183?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13680161

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu setting up add_form_quey_rel_fields, edit_form_query_rel_fields for roles dropdown filtering cant get user context ? (g.user)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13691068

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
Superset doesn't have a built-in user profile avatar feature or a UI for user-level language or time zone preferences. The only avatar support is via Slack integration—if you set `SLACK_ENABLE_AVATARS = True` and configure Slack, Superset can fetch avatars from Slack, but there's no UI for users to upload or manage their own avatars, and this is not a general-purpose profile feature ([source](https://github.com/apache/superset/issues/32606)).

Language and time zone settings are global, not per-user. You can enable a language selection dropdown by setting the `LANGUAGES` variable in `superset_config.py`, but this only affects the session and isn't stored as a user preference ([source](https://github.com/apache/superset/discussions/33594)). There's no built-in way for users to set their own time zone—time zone handling is global or dataset-specific.

If you need true user-level preferences (avatar, language, time zone), it would require custom backend and frontend development, possibly extending the `UserAttribute` model and building new UI components ([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/models/user_attributes.py)). There are no official plugins or settings for this today.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=d42df4ef-ef3e-4f55-a8ae-d4198a5ae614) [![Learn about superset with Dosu](https://img.shields.io/badge/Learn%20about%20superset%20with%20Dosu-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDcz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4wMTM1IiBzdHJva2U9ImJsYWNrIiB
 zdHJva2Utd2lkdGg9IjcuNjkxNjEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [![Add Dosu to your team](https://img.shields.io/badge/Add%20Dosu%20to%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13718315

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
This error happens because Superset loads superset_config.py before the Flask app context is established, so any imports or logic in that file (or modules it imports) that depend on app.config or Flask globals will fail with "Working outside of application context" [reference](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/config.py).

To fix this, move all imports and logic that depend on the Flask app (like importing RoleRestAPI or registering custom APIs) inside the FLASK_APP_MUTATOR function in your superset_config.py. Only run them inside this function, which is called after the app context is ready [reference](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/initialization/__init__.py). For example:

```python
# superset_config.py

def FLASK_APP_MUTATOR(app):
    from custom_role_api import TenantRoleRestAPI  # Import here, not at top-level
    # Register or monkey-patch your API here
    # Example: appbuilder.add_api(TenantRoleRestAPI)
```

Make sure you do not import custom_role_api or RoleRestAPI at the top level of superset_config.py or any module that is imported before the app context exists. This pattern matches how Superset itself registers APIs and avoids context errors [reference](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/initialization/__init__.py).

If you follow this pattern, your customizations will run safely after the app is initialized, and the error should go away.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=082dc424-620b-4730-b189-189f6d299f1b) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwM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y42MTUzMkg0Mi41ODA1Vi02LjU3OTE5SDQwLjcwNFY3LjYxNTMyWiIgZmlsbD0iYmxhY2siIG1hc2s9InVybCgjZG9zdS1kLWN1dG91dCkiLz48cGF0aCBkPSJNNjguOTIxNSAzNi4wMTM1QzY4LjkyMTUgMzYuMDEzNSA2NS43MzY5IDQ5LjQ3MzggNTEuNDIzMSA0OS40NzM4QzM3LjEwOTMgNDkuNDczOCAzMi41Nzg3IDM3LjM1OTYgMzIuNTc4NyAzNi4wMTM1IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjcuNjkxNjEi
 IHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13637524

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu i was able to restrict listing users and roles overriding the queries that were used to fetch and registering in superset_config.py. But restricting the roles in the add/edit users isn't working/ is it the "v1/security/roles" that fetches the roles in the dropdown or what?

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13627692

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu what you shared for reference is "/security/roles/search/". but you mentioned "/security/roles" is the one we use for dropdown population ?


GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13635976

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
This error happens because Superset loads superset_config.py before the Flask app context is established, so any imports or logic in that file (or modules it imports) that depend on app.config or Flask globals will fail with "Working outside of application context" [reference](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/config.py).

To fix this, move all imports and logic that depend on the Flask app (like importing RoleRestAPI or registering custom APIs) inside the FLASK_APP_MUTATOR function in your superset_config.py. Only run them inside this function, which is called after the app context is ready [reference](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/initialization/__init__.py). For example:

```python
# superset_config.py

def FLASK_APP_MUTATOR(app):
    from custom_role_api import TenantRoleRestAPI  # Import here, not at top-level
    # Register or monkey-patch your API here
    # Example: appbuilder.add_api(TenantRoleRestAPI)
```

Make sure you do not import custom_role_api or RoleRestAPI at the top level of superset_config.py or any module that is imported before the app context exists. This pattern matches how Superset itself registers APIs and avoids context errors [reference](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/initialization/__init__.py).

If you follow this pattern, your customizations will run safely after the app is initialized, and the error should go away.


<!-- 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/082dc424-620b-4730-b189-189f6d299f1b?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/082dc424-620b-4730-b189-189f6d299f1b?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/082dc424-620b-4730-b189-189f6d299f1b?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/082dc424-620b-4730-b189-189f6d299f1b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/082dc424-620b-4730-b189-189f6d299f1b?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/082dc424-620b-4730-b189-189f6d299f1b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/082dc424-620b-4730-b189-189f6d299f1b?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13637524

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu i used git clone https://github.com/apache/superset.git => git checkout tags/5.0.0. but most of the code is missing. what is the reason ?



GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13639125

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
Yes, the roles dropdown in the add/edit user UI is populated by the `/api/v1/security/roles/` endpoint ([source](https://github.com/apache/superset/blob/050ccdcb3dd84f3ae6e301d61021e72474e754d7/superset-frontend/src/pages/UsersList/index.tsx)). The frontend fetches all roles from this endpoint and passes them to the modal for user creation/editing. 

If you’ve set up query filters in `superset_config.py`, those only affect some UI lists, not the roles shown in the add/edit modal—because the modal fetches directly from the backend API, which by default returns all roles. To restrict which roles appear in the dropdown, you’ll need to enforce filtering at the backend API level (for example, by customizing the RoleRestAPI or your security manager) so that only the allowed roles are returned for the current user ([source](https://github.com/apache/superset/blob/050ccdcb3dd84f3ae6e301d61021e72474e754d7/superset/security/api.py)). There’s no built-in way to restrict assignable roles in the add/edit UI based on the current user’s permissions—this requires backend customization.


<!-- 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/c17dd747-e635-467b-9354-ad5157d8daaf?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/c17dd747-e635-467b-9354-ad5157d8daaf?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/c17dd747-e635-467b-9354-ad5157d8daaf?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/c17dd747-e635-467b-9354-ad5157d8daaf?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c17dd747-e635-467b-9354-ad5157d8daaf?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/c17dd747-e635-467b-9354-ad5157d8daaf?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c17dd747-e635-467b-9354-ad5157d8daaf?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13627712

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
The /api/v1/security/roles/ endpoint is implemented in the RoleRestAPI class in superset/security/api.py. All the logic for listing, filtering, and returning roles is in this class, mainly in the get_list method. The API is registered and exposed via Flask AppBuilder in superset/initialization/__init__.py, which makes it available under /api/v1/security/roles/ as part of the Superset API suite. You can see the implementation details here: [superset/security/api.py (RoleRestAPI)](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset/security/api.py).


<!-- 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/860c9ad7-5486-4038-ae0b-89147edcbcf9?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/860c9ad7-5486-4038-ae0b-89147edcbcf9?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/860c9ad7-5486-4038-ae0b-89147edcbcf9?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/860c9ad7-5486-4038-ae0b-89147edcbcf9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/860c9ad7-5486-4038-ae0b-89147edcbcf9?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/860c9ad7-5486-4038-ae0b-89147edcbcf9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/860c9ad7-5486-4038-ae0b-89147edcbcf9?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13636235

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu show me where the /security/roles/ implementation is present

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13636218

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu RoleRestAPI class in superset/security/api.py isn't present in the latest releases 5.0.0, 54.1.2 etc.. whats the reason ?


GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13636498

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu then show me how to override it list only Tenant-user role for Tenant-manager role user as mentioned in the top

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13636596

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

@dosu even though results are similar the implementations are differing when FAB_ADD_SECURITY_API = true and not. once verify as the endpoints are similar for /api/v1/security/*

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13635905

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Multi-Tenant User management

<!-- Answer -->
The roles dropdown in the add/edit user modal is populated using the /api/v1/security/roles/ endpoint, not /api/v1/security/roles/search/. The frontend fetches roles from /api/v1/security/roles/ and passes them to the modal for display—there’s no usage of /search/ for this purpose in the UI code. Both endpoints share backend logic and return similar data, but /api/v1/security/roles/ is the standard and stable API path used for dropdown population in Superset’s user management UI.  
[Source: UsersList component](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/superset-frontend/src/pages/UsersList/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/e2599d67-041c-4f91-a704-74879cedf16e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/e2599d67-041c-4f91-a704-74879cedf16e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/e2599d67-041c-4f91-a704-74879cedf16e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/e2599d67-041c-4f91-a704-74879cedf16e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/e2599d67-041c-4f91-a704-74879cedf16e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/e2599d67-041c-4f91-a704-74879cedf16e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/e2599d67-041c-4f91-a704-74879cedf16e?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on X](https://img.shields.io/badge/X-share-black)](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-13635986

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "sainikhilsamineni (via GitHub)" <gi...@apache.org>.
GitHub user sainikhilsamineni added a comment to the discussion: Multi-Tenant User management

> @dosu whats "ENABLE_TEMPLATE_PROCESSING" ? Can it help introducing a custom timezone selector to render charts x-axis according to that? If it can does it also adjust the natively available time-range filter ?

@dosu ?

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13760107

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
This happens because the Superset git repository intentionally excludes built frontend assets, generated files, and large dependencies (like superset/static/assets, superset-frontend/build, node_modules, translation files, etc.) via its .gitignore. When you clone and check out a tag, you only get the raw source code, not the production-ready assets or translations needed to run Superset out of the box. Official release tarballs and PyPI packages include these built files because the release process runs all build steps before packaging ([.gitignore](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/.gitignore), [release docs](https://github.com/apache/superset/blob/308007f909b5a3c1cdd6fc5632ef27ca7eb97ce0/RELEASING/README.md)).

If you want a working Superset from git, after checkout you need to run the frontend and translation build steps (npm/yarn build in superset-frontend, translation scripts, etc.) as described in the development/installation docs. If you want all files prebuilt, use the official release tarball or PyPI package instead.

Also, avoid using git clone --depth=1 if you want to check out tags—shallow clones can miss tags and files ([discussion](https://github.com/apache/superset/issues/33027)).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=f7e7a7c7-3332-41d7-8124-18a3341801ce) [![Learn about superset with Dosu](https://img.shields.io/badge/Learn%20about%20superset%20with%20Dosu-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwOTlWODMuNTc5MkMzLjU4NTU3IDg0Ljc1NDIgNC4
 5ODU2MyA4NS4zNjUyIDUuODQ3MDUgODQuNTY2TDE5LjYyOTYgNzEuN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Q5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [![Add Dosu to your team](https://img.shields.io/badge/Add%20Dosu%20to%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13639150

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
To override the roles dropdown (used in the add/edit user modal) for tenant-based filtering—without disrupting other APIs and with FAB_ADD_SECURITY_API enabled—subclass the RoleRestAPI and override its get_list method. Register your subclass using FLASK_APP_MUTATOR so it only affects the roles endpoint.

Here’s a pattern you can use (Superset 5.x):

```python
# In custom_role_api.py (do not import this at module level in superset_config.py)
from flask import g
from superset.security.api import RoleRestAPI
from superset.extensions import security_manager
from superset.models.core import db
from sqlalchemy.orm import joinedload

class TenantRoleRestAPI(RoleRestAPI):
    def get_list(self, **kwargs):
        user_roles = [role.name for role in security_manager.get_user_roles(g.user)]
        query = db.session.query(self.datamodel.obj).options(
            joinedload("permissions"), joinedload("user")
        )
        # Example: restrict to "Tenant-user" if current user is "Tenant-manager"
        if "Tenant-manager" in user_roles:
            query = query.filter(self.datamodel.obj.name == "Tenant-user")
        # Continue with original pagination/filter logic
        # ... (copy rest of RoleRestAPI.get_list logic here, using your filtered query)
        # Or call super() if you want to apply additional filters
        return super().get_list(**kwargs)
```

Then, in your `superset_config.py`:

```python
def FLASK_APP_MUTATOR(app):
    from custom_role_api import TenantRoleRestAPI
    appbuilder = app.appbuilder
    # Remove the default RoleRestAPI and register your override
    appbuilder.add_view_no_menu(TenantRoleRestAPI)
```

Make sure all imports and registration happen inside FLASK_APP_MUTATOR, not at the top level, to avoid Flask context errors. This pattern only overrides the roles listing endpoint and leaves other APIs untouched. You can expand the filtering logic for more complex multi-tenant scenarios as needed.

This approach is safe, modular, and upgrade-friendly as long as you keep your override logic in sync with upstream changes to RoleRestAPI.  
[Reference: RoleRestAPI and registration](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/security/api.py) | [App init pattern](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/initialization/__init__.py)


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=6286c92d-b1ba-44df-bd3c-fad1d984eb2b) [![Ask Dosu about superset](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jM4NDcgNzguNTU2IDM4LjM3MDFIOTIuNzUwNUM5Mi43NTA1IDEzLjU0NTMgNzIuNjI2IC02LjU3OTE5IDQ3LjgwMTMgLTYuNTc5MTlWNy42MTUzMlpNNDIuNTgwNSA3LjYxNTMySDQ3LjgwMTNWLTYuNTc5MTlINDIuNTgwNVY3LjYxNTMyWk00MC43MDQgNy42MTUzMkg0Mi41ODA1Vi02LjU3OTE5SDQwLjcwNFY3LjYxNTMyWiIgZmlsbD0iYmxhY2siIG1hc2s9InVybCgjZG9zdS1kLWN1dG91dCkiLz48cGF0aCBkPSJNNjguOTIxNSAzNi4wMTM1QzY4LjkyMTUgMzYuMDEzNSA2NS43MzY5IDQ5LjQ3MzggNTEuNDIzMSA0OS40NzM4QzM3LjEwOTMgNDkuNDczOCAzMi41Nzg3IDM3LjM1OTYgMzIuNTc4NyAzNi4wMTM1IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjcuNjkxNjEi
 IHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13679617

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Multi-Tenant User management [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Multi-Tenant User management

<!-- Answer -->
Superset displays time-series chart x-axes (including line, area, and bar charts) in UTC by default—there’s no built-in per-user time zone support in the dashboard UI or chart controls. All time zone handling is global or dataset-specific, and the frontend always renders timestamps in UTC unless you customize the code [source](https://github.com/apache/superset/issues/33570).

However, ECharts (used for most time-series charts) is flexible and can be customized to display times in a user’s local time zone. Superset’s frontend includes a TimezoneSelector component and uses the dayjs library with timezone support, but these aren’t wired into dashboards or chart controls out of the box [source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/packages/superset-ui-core/src/components/TimezoneSelector/index.tsx).

To implement per-user time zone display, you’d need to: (1) capture the user’s preferred time zone (using TimezoneSelector or another UI), (2) store it (in session, user attribute, etc.), and (3) pass it to the ECharts chart’s transformProps function, where you can use a custom x-axis formatter (with dayjs.tz) to render axis labels in the user’s time zone [source](https://github.com/apache/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts). This approach works for any ECharts-based time-series chart.

There’s no direct way to edit ECharts JSON config in the UI; you’d need to modify the transformProps.ts file for the relevant chart type [source](https://github.com/apache/superset/discussions/31802). Other chart types (like area and bar) use the same ECharts infrastructure and support similar customization.

There are no official plugins or documented best practices for end-to-end per-user time zone handling in Superset dashboards as of now, so this would be a custom frontend extension. The building blocks exist, but you’d need to wire them together in your deployment.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=8af4bb87-33c7-4dd1-b347-4500347890fd) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwOTlWODMuNTc5MkMzLjU4NTU3IDg0Ljc1NDIgNC45ODU2MyA4NS4zNjUyIDUuODQ3MDUg
 ODQuNTY2TDE5LjYyOTYgNzEuNzgwMSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZH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OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/33877#discussioncomment-13731389

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org