You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "georgeteena (via GitHub)" <gi...@apache.org> on 2026/04/02 02:20:21 UTC
[D] Hide/remove the "Charts" section in landing page for certain users [superset]
GitHub user georgeteena created a discussion: Hide/remove the "Charts" section in landing page for certain users
Hi,
I have a multi-tenancy enabled Superset installation. For some external user dashboards, I need to give dashboard view only access. For such users, is it possible to hide/disable the "Charts" widget/section in the landing page?
Does this require front end changes?
Thanks,
Teena
@dosu
GitHub link: https://github.com/apache/superset/discussions/39019
----
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] Hide/remove the "Charts" section in landing page for certain users [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Hide/remove the "Charts" section in landing page for certain users
<!-- Answer -->
Hi Teena,
There's currently **no built-in configuration or role-based setting** to hide the Charts section from the landing page for specific users. The only section that currently respects permissions is **Saved Queries**, which hides itself if the user lacks `can_read` on that resource [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/pages/Home/index.tsx#L416-L432).
A community PR ([#33946](https://github.com/apache/superset/pull/33946)) has been submitted to hide the Charts section based on `can_write` permissions, but it's still awaiting review [[2]](https://github.com/apache/superset/pull/33946).
**Best workaround today** — bypass the welcome page entirely by redirecting users to `/dashboard/list/` using `FLASK_APP_MUTATOR` in your `superset_config.py` [[3]](https://github.com/apache/superset/discussions/34594):
```python
from flask_appbuilder import expose, IndexView
from flask import g, redirect
class SupersetDashboardIndexView(IndexView):
@expose('/')
def index(self):
if not g.user:
return redirect('/login')
return redirect('/dashboard/list/')
def mutate_app(app):
from superset.extensions import appbuilder
appbuilder.indexview = SupersetDashboardIndexView
return app
FLASK_APP_MUTATOR = mutate_app
```
You could make this conditional per role if you check `g.user.roles` before deciding where to redirect.
**Other options:**
- The welcome page has a `'welcome.main.replacement'` extension point [[4]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/pages/Home/index.tsx#L179-L184) that could theoretically replace the entire main content area with a custom implementation, though documentation on this is limited.
- [SIP-198 / Issue #37016](https://github.com/apache/superset/issues/37016) proposes full homepage customization (toggleable widgets, role-based layouts, etc.), but it's still a proposal [[5]](https://github.com/apache/superset/issues/37016).
- Direct frontend modifications to `superset-frontend/src/pages/Home/index.tsx` [[6]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/pages/Home/index.tsx#L357-L434) would work but are not recommended since you'd need to maintain a fork and deal with merge conflicts on upgrades.
So to answer your question directly — yes, selectively hiding the Charts section today would require either frontend changes or using the redirect workaround above to avoid the welcome page altogether.
<!-- 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).
[](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=a57bfd72-aebf-4317-8e3a-a526b92ef033) [](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) [](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/39019#discussioncomment-16417003
----
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] Hide/remove the "Charts" section in landing page for certain users [superset]
Posted by "georgeteena (via GitHub)" <gi...@apache.org>.
GitHub user georgeteena added a comment to the discussion: Hide/remove the "Charts" section in landing page for certain users
@dosu
Code review comment - `appbuilder.indexview` cannot be overridden like above — FAB registers routes at init time, so post-init mutation has no effect. The `before_request` hook is the correct mechanism for runtime redirects.
What worked:
```
DASHBOARD_ONLY_ROLES = {"role-1", "role-2"}
def is_dashboard_only_user():
if not g.user or g.user.is_anonymous:
return False
user_role_names = {role.name for role in g.user.roles}
return bool(user_role_names & DASHBOARD_ONLY_ROLES)
def flask_app_mutator(app):
@app.before_request
def redirect_welcome_page():
# List of welcome page paths to intercept
welcome_paths = [
"/",
"/superset/welcome/",
"/superset/welcome",
"/welcome/",
"/welcome",
]
if request.path in welcome_paths:
if hasattr(g, "user") and g.user and not g.user.is_anonymous:
if is_dashboard_only_user():
logger.info(f"Redirecting user '{g.user.username}' from {request.path} " "to /dashboard/list/")
return redirect("/dashboard/list/")
return None
return app
```
GitHub link: https://github.com/apache/superset/discussions/39019#discussioncomment-16417708
----
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] Hide/remove the "Charts" section in landing page for certain users [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Hide/remove the "Charts" section in landing page for certain users
<!-- Answer -->
Great catch — you're right that `appbuilder.indexview` can't be reliably overridden via `FLASK_APP_MUTATOR` since FAB registers its routes at init time. The `before_request` hook is the correct approach for runtime redirects.
Thanks for sharing the working solution! The role-based check with `DASHBOARD_ONLY_ROLES` is a clean pattern, and intercepting all the welcome page path variants ensures nothing slips through. This should be very helpful for Teena and anyone else with a similar multi-tenancy setup.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=brand-link).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-great_response#message_id=f31a2490-657f-4099-960e-bc1b8da03f3a&feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-irrelevant_answer#message_id=f31a2490-657f-4099-960e-bc1b8da03f3a&feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-incorrect_sources#message_id=f31a2490-657f-4099-960e-bc1b8da03f3a&feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-too_verbose#message_id=f31a2490-657f-4099-960e-bc1b8da03f3a&feedback_type=too_verbose) | [Hallucination](https://app
.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-hallucination#message_id=f31a2490-657f-4099-960e-bc1b8da03f3a&feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-bug_report#message_id=f31a2490-657f-4099-960e-bc1b8da03f3a&feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-other#message_id=f31a2490-657f-4099-960e-bc1b8da03f3a&feedback_type=other)</sup>
[](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=chat-badge) [](https://cursor.com/link/prompt?text=Great%20catch%20%E2%80%94%20you%27re%20right%20that%20%60appbuilder.indexview%60%20can%27t%20be%20reliably%20overridden%20via%20%60FLASK_APP_MUTATOR%60%20since%20FAB%20registers%20its%20routes%20at%20init%20time.%20The%20%60before_request%60%20hook%20is%20the%20correct%20approach%20for%20runtime%20redirects.%0A%0AThanks%20for%20sharing%20the%20working%20solution%21%20The%20role-based%20check%20with%20%60DASHBOARD_ONLY_ROLES%60%20is%20a%20clean%20pattern%2C%20and%20intercepting%20all%20the%20welcome%20page%20path%20variants%20ensures%20nothing%20slips%20through.%20This%20should%20be%20very%20helpful%20for%20Teena%20and%20anyone%20else%20with%20a%20similar%20multi-tenancy%20setu
p.) [](https://go.dosu.dev/discord-bot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=join-discord) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/39019)
GitHub link: https://github.com/apache/superset/discussions/39019#discussioncomment-16417710
----
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] Hide/remove the "Charts" section in landing page for certain users [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Hide/remove the "Charts" section in landing page for certain users
<!-- Answer -->
Great catch — you're right that `appbuilder.indexview` can't be reliably overridden via `FLASK_APP_MUTATOR` since FAB registers its routes at init time. The `before_request` hook is the correct approach for runtime redirects.
Thanks for sharing the working solution! The role-based check with `DASHBOARD_ONLY_ROLES` is a clean pattern, and intercepting all the welcome page path variants ensures nothing slips through. This should be very helpful for Teena and anyone else with a similar multi-tenancy setup.
<!-- 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).
[](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=f31a2490-657f-4099-960e-bc1b8da03f3a) [](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) [](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/39019#discussioncomment-16417710
----
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] Hide/remove the "Charts" section in landing page for certain users [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Hide/remove the "Charts" section in landing page for certain users
<!-- Answer -->
Hi Teena,
There's currently **no built-in configuration or role-based setting** to hide the Charts section from the landing page for specific users. The only section that currently respects permissions is **Saved Queries**, which hides itself if the user lacks `can_read` on that resource [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/pages/Home/index.tsx#L416-L432).
A community PR ([#33946](https://github.com/apache/superset/pull/33946)) has been submitted to hide the Charts section based on `can_write` permissions, but it's still awaiting review [[2]](https://github.com/apache/superset/pull/33946).
**Best workaround today** — bypass the welcome page entirely by redirecting users to `/dashboard/list/` using `FLASK_APP_MUTATOR` in your `superset_config.py` [[3]](https://github.com/apache/superset/discussions/34594):
```python
from flask_appbuilder import expose, IndexView
from flask import g, redirect
class SupersetDashboardIndexView(IndexView):
@expose('/')
def index(self):
if not g.user:
return redirect('/login')
return redirect('/dashboard/list/')
def mutate_app(app):
from superset.extensions import appbuilder
appbuilder.indexview = SupersetDashboardIndexView
return app
FLASK_APP_MUTATOR = mutate_app
```
You could make this conditional per role if you check `g.user.roles` before deciding where to redirect.
**Other options:**
- The welcome page has a `'welcome.main.replacement'` extension point [[4]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/pages/Home/index.tsx#L179-L184) that could theoretically replace the entire main content area with a custom implementation, though documentation on this is limited.
- [SIP-198 / Issue #37016](https://github.com/apache/superset/issues/37016) proposes full homepage customization (toggleable widgets, role-based layouts, etc.), but it's still a proposal [[5]](https://github.com/apache/superset/issues/37016).
- Direct frontend modifications to `superset-frontend/src/pages/Home/index.tsx` [[6]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/pages/Home/index.tsx#L357-L434) would work but are not recommended since you'd need to maintain a fork and deal with merge conflicts on upgrades.
So to answer your question directly — yes, selectively hiding the Charts section today would require either frontend changes or using the redirect workaround above to avoid the welcome page altogether.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=brand-link).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-great_response#message_id=a57bfd72-aebf-4317-8e3a-a526b92ef033&feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-irrelevant_answer#message_id=a57bfd72-aebf-4317-8e3a-a526b92ef033&feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-incorrect_sources#message_id=a57bfd72-aebf-4317-8e3a-a526b92ef033&feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-too_verbose#message_id=a57bfd72-aebf-4317-8e3a-a526b92ef033&feedback_type=too_verbose) | [Hallucination](https://app
.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-hallucination#message_id=a57bfd72-aebf-4317-8e3a-a526b92ef033&feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-bug_report#message_id=a57bfd72-aebf-4317-8e3a-a526b92ef033&feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-other#message_id=a57bfd72-aebf-4317-8e3a-a526b92ef033&feedback_type=other)</sup>
[](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=chat-badge) [](https://cursor.com/link/prompt?text=Hi%20Teena%2C%0A%0AThere%27s%20currently%20%2A%2Ano%20built-in%20configuration%20or%20role-based%20setting%2A%2A%20to%20hide%20the%20Charts%20section%20from%20the%20landing%20page%20for%20specific%20users.%20The%20only%20section%20that%20currently%20respects%20permissions%20is%20%2A%2ASaved%20Queries%2A%2A%2C%20which%20hides%20itself%20if%20the%20user%20lacks%20%60can_read%60%20on%20that%20resource%20%5B%5B1%5D%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/pages/Home/index.tsx%23L416-L432%29.%0A%0AA%20community%20PR%20%28%5B%2333946%5D%28https%3A//github.com/apache/superset/pull/33946%29%29%20has%20been%20submitte
d%20to%20hide%20the%20Charts%20section%20based%20on%20%60can_write%60%20permissions%2C%20but%20it%27s%20still%20awaiting%20review%20%5B%5B2%5D%5D%28https%3A//github.com/apache/superset/pull/33946%29.%0A%0A%2A%2ABest%20workaround%20today%2A%2A%20%E2%80%94%20bypass%20the%20welcome%20page%20entirely%20by%20redirecting%20users%20to%20%60/dashboard/list/%60%20using%20%60FLASK_APP_MUTATOR%60%20in%20your%20%60superset_config.py%60%20%5B%5B3%5D%5D%28https%3A//github.com/apache/superset/discussions/34594%29%3A%0A%0A%60%60%60python%0Afrom%20flask_appbuilder%20import%20expose%2C%20IndexView%0Afrom%20flask%20import%20g%2C%20redirect%0A%0Aclass%20SupersetDashboardIndexView%28IndexView%29%3A%0A%20%20%20%20%40expose%28%27/%27%29%0A%20%20%20%20def%20index%28self%29%3A%0A%20%20%20%20%20%20%20%20if%20not%20g.user%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20redirect%28%27/login%27%29%0A%20%20%20%20%20%20%20%20return%20redirect%28%27/dashboard/list/%27%29%0A%0Adef%20mutate_app%28app%29%3A%0A%20%2
0%20%20from%20superset.extensions%20import%20appbuilder%0A%20%20%20%20appbuilder.indexview%20%3D%20SupersetDashboardIndexView%0A%20%20%20%20return%20app%0A%0AFLASK_APP_MUTATOR%20%3D%20mutate_app%0A%60%60%60%0A%0AYou%20could%20make%20this%20conditional%20per%20role%20if%20you%20check%20%60g.user.roles%60%20before%20deciding%20where%20to%20redirect.%0A%0A%2A%2AOther%20options%3A%2A%2A%0A%0A-%20The%20welcome%20page%20has%20a%20%60%27welcome.main.replacement%27%60%20extension%20point%20%5B%5B4%5D%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/pages/Home/index.tsx%23L179-L184%29%20that%20could%20theoretically%20replace%20the%20entire%20main%20content%20area%20with%20a%20custom%20implementation%2C%20though%20documentation%20on%20this%20is%20limited.%0A-%20%5BSIP-198%20/%20Issue%20%2337016%5D%28https%3A//github.com/apache/superset/issues/37016%29%20proposes%20full%20homepage%20customization%20%28toggleable%20widgets%2C%20role-b
ased%20layouts%2C%20etc.%29%2C%20but%20it%27s%20still%20a%20proposal%20%5B%5B5%5D%5D%28https%3A//github.com/apache/superset/issues/37016%29.%0A-%20Direct%20frontend%20modifications%20to%20%60superset-frontend/src/pages/Home/index.tsx%60%20%5B%5B6%5D%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/pages/Home/index.tsx%23L357-L434%29%20would%20work%20but%20are%20not%20recommended%20since%20you%27d%20need%20to%20maintain%20a%20fork%20and%20deal%20with%20merge%20conflicts%20on%20upgrades.%0A%0ASo%20to%20answer%20your%20question%20directly%20%E2%80%94%20yes%2C%20selectively%20hiding%20the%20Charts%20section%20today%20would%20require%20either%20frontend%20changes%20or%20using%20the%20redirect%20workaround%20above%20to%20avoid%20the%20welcome%20page%20altogether.) [](https://go.dosu.dev/discord-bot?utm_source=github&utm_medium=bot-c
omment&utm_campaign=github-assistant&utm_content=join-discord) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/39019)
GitHub link: https://github.com/apache/superset/discussions/39019#discussioncomment-16417003
----
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