GitHub user dosubot[bot] added a comment to the discussion: issue in superset using iframe
<!-- Answer --> In Superset 4.1.4, you can't fully hide the "Exit Full Screen" menu or SQL Lab options in embedded dashboards just by changing superset_config.py or using the iframe standalone parameter—these menus are controlled by frontend logic and user permissions, not by configuration or URL parameters [(source)](https://github.com/apache/superset/issues/36377). If you want to try hiding these UI elements with CSS (not secure, but possible), you can target menu items using their Ant Design classes or data-test attributes. For example, to hide the "Exit Full Screen" option in the dashboard header dropdown, you could use: ```css /* Hide the fullscreen menu item in the dashboard header actions menu */ [data-test="header-actions-menu"] .ant-menu-item:has(span:contains('Exit fullscreen')) { display: none !important; } ``` For chart menus (the 3-dots menu on each chart), you might try: ```css /* Hide the fullscreen menu item in chart slice menus */ .ant-dropdown-menu-item:has(span:contains('Exit fullscreen')) { display: none !important; } ``` You can add this CSS via the CssTemplate feature in Superset (Dashboard → Edit → CSS Templates), or by overriding static assets if your deployment allows. Important caveats: - This only hides the menu visually; it does not remove permissions or prevent access if users know the URLs. - CSS selectors may break after upgrades or if the menu text changes. - Some browsers do not support `:has()` or `:contains()` in CSS, so you may need to use more generic selectors or test in your environment. For more robust control, you would need to use the Embedded SDK with guest tokens and a custom read-only role, but that's not possible with your current setup [(source)](https://github.com/apache/superset/issues/36377). If you want to minimize what users see, also review your user/role permissions in Superset and remove any permissions for SQL Lab, editing, or exporting from the roles used for embedding [(source)](https://github.com/apache/superset/issues/32183). Let me know if you need help with the exact CSS selectors for your menus—sometimes the menu structure changes depending on your Superset theme or version. <!-- 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/c761f091-eaf3-4659-9227-171c98212461?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/c761f091-eaf3-4659-9227-171c98212461?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/c761f091-eaf3-4659-9227-171c98212461?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/c761f091-eaf3-4659-9227-171c98212461?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c761f091-eaf3-4659-9227-171c98212461?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/c761f091-eaf3-4659-9227-171c98212461?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c761f091-eaf3-4659-9227-171c98212461?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=In%20Superset%204.1.4%2C%20you%20can%27t%20fully%20hide%20the%20%22Exit%20Full%20Screen%22%20menu%20or%20SQL%20Lab%20options%20in%20embedded%20dashboards%20just%20by%20changing%20superset_config.py%20or%20using%20the%20iframe%20standalone%20parameter%E2%80%94these%20menus%20are%20controlled%20by%20frontend%20logic%20and%20user%20permissions%2C%20not%20by%20configuration%20or%20URL%20parameters%20%5B%28source%29%5D%28https%3A//github.com/apache/superset/issues/36377%29.%0A%0AIf%20you%20want%20to%20try%20hiding%20these%20UI%20elements%20with%20CSS%20%28not%20secure%2C%20but%20possible%29%2C%20you%20can%20target%20menu%20items%20using%20their%20Ant%20Design%20classes%20or%20data-test%20attributes.%20For%20example%2C%20to%20hide%20the%20%22Exit%20Full%20S creen%22%20option%20in%20the%20dashboard%20header%20dropdown%2C%20you%20could%20use%3A%0A%0A%60%60%60css%0A/%2A%20Hide%20the%20fullscreen%20menu%20item%20in%20the%20dashboard%20header%20actions%20menu%20%2A/%0A%5Bdata-test%3D%22header-actions-menu%22%5D%20.ant-menu-item%3Ahas%28span%3Acontains%28%27Exit%20fullscreen%27%29%29%20%7B%0A%20%20display%3A%20none%20%21important%3B%0A%7D%0A%60%60%60%0A%0AFor%20chart%20menus%20%28the%203-dots%20menu%20on%20each%20chart%29%2C%20you%20might%20try%3A%0A%0A%60%60%60css%0A/%2A%20Hide%20the%20fullscreen%20menu%20item%20in%20chart%20slice%20menus%20%2A/%0A.ant-dropdown-menu-item%3Ahas%28span%3Acontains%28%27Exit%20fullscreen%27%29%29%20%7B%0A%20%20display%3A%20none%20%21important%3B%0A%7D%0A%60%60%60%0A%0AYou%20can%20add%20this%20CSS%20via%20the%20CssTemplate%20feature%20in%20Superset%20%28Dashboard%20%E2%86%92%20Edit%20%E2%86%92%20CSS%20Templates%29%2C%20or%20by%20overriding%20static%20assets%20if%20your%20deployment%20allows.%0A%0AImportant%20cav eats%3A%0A-%20This%20only%20hides%20the%20menu%20visually%3B%20it%20does%20not%20remove%20permissions%20or%20prevent%20access%20if%20users%20know%20the%20URLs.%0A-%20CSS%20selectors%20may%20break%20after%20upgrades%20or%20if%20the%20menu%20text%20changes.%0A-%20Some%20browsers%20do%20not%20support%20%60%3Ahas%28%29%60%20or%20%60%3Acontains%28%29%60%20in%20CSS%2C%20so%20you%20may%20need%20to%20use%20more%20generic%20selectors%20or%20test%20in%20your%20environment.%0A%0AFor%20more%20robust%20control%2C%20you%20would%20need%20to%20use%20the%20Embedded%20SDK%20with%20guest%20tokens%20and%20a%20custom%20read-only%20role%2C%20but%20that%27s%20not%20possible%20with%20your%20current%20setup%20%5B%28source%29%5D%28https%3A//github.com/apache/superset/issues/36377%29.%0A%0AIf%20you%20want%20to%20minimize%20what%20users%20see%2C%20also%20review%20your%20user/role%20permissions%20in%20Superset%20and%20remove%20any%20permissions%20for%20SQL%20Lab%2C%20editing%2C%20or%20exporting%20from%20the%20r oles%20used%20for%20embedding%20%5B%28source%29%5D%28https%3A//github.com/apache/superset/issues/32183%29.%0A%0ALet%20me%20know%20if%20you%20need%20help%20with%20the%20exact%20CSS%20selectors%20for%20your%20menus%E2%80%94sometimes%20the%20menu%20structure%20changes%20depending%20on%20your%20Superset%20theme%20or%20version.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36447) GitHub link: https://github.com/apache/superset/discussions/36447#discussioncomment-15186079 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
