Repository navigation
fix(frontend): hide news widget from default dashboard for non-superusers - #13099
Merged
SchrodingersGat merged 1 commit intoOct 26, 2026
Merged
Conversation
…sers defaultLayouts only places the news widget for superusers, but defaultWidgets always included it, so non-superusers saw a "Requires Superuser" alert on a fresh dashboard.
✅ Deploy Preview for inventree-web-pui-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
SchrodingersGat
approved these changes
Oct 25, 2026
Member
|
@Nero7991 thanks for the fix! |
Contributor
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
SchrodingersGat
pushed a commit
that referenced
this pull request
Oct 26, 2026
…sers (#13099) (#13103) defaultLayouts only places the news widget for superusers, but defaultWidgets always included it, so non-superusers saw a "Requires Superuser" alert on a fresh dashboard. (cherry picked from commit 6d0ae8d) Co-authored-by: Oren <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

On a fresh dashboard, non-superuser accounts see a red "Requires Superuser" alert in place of the news widget, which suggests their account is missing permissions.
DashboardLayoutalready accounts for this indefaultLayouts(thenewslayout entry is only added for superusers), butdefaultWidgetsalways loaded['news', 'gstart']. The widget then renders for everyone, andNewsWidgetshows its superuser alert.This change applies the same superuser check to
defaultWidgets, so non-superusers get only the "Getting Started" widget by default. Superusers see no change, and users can still add widgets by hand as before.Seen on 1.6.1; the code on
masteris unchanged.src/frontend/src/components/dashboard/DashboardLayout.tsx, +4 / -2. Not built or run locally (no frontend toolchain here); it is a type-safe change to a string list and auseMemodependency.Generated with Claude Code
https://claude.ai/code/session_01CR5gRLhFZQApAYRXBAtk3S