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-unsubscr...@superset.apache.org


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

Reply via email to