[UI] Adjust "superuser warning" banner#11696
[UI] Adjust "superuser warning" banner#11696SchrodingersGat merged 5 commits intoinventree:masterfrom
Conversation
✅ Deploy Preview for inventree-web-pui-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| !elevatedAlertClosed && | ||
| !window.INVENTREE_SETTINGS.dangerous_hide_evelevated_alert, | ||
| [user, elevatedAlertClosed] | ||
| (user?.is_superuser || false) && |
There was a problem hiding this comment.
This defeats half of the purpose of this. As we recently learned the hard way: the “staff” user flag is also dangerous and should be guarded. Not warning against it will lead to ppl not reading the docs and being unaware of the risky thing they are doing by using a user with that flag
There was a problem hiding this comment.
I 100% agree for a superuser - but IMO operating as a staff user is expected.
Otherwise, does every "staff" user need a secondary account for their day-to-day operations?
There was a problem hiding this comment.
given the current security boundaries for templates: yes
There was a problem hiding this comment.
I have added two separate settings to control this then. They can be hard-coded via environment variables - as with any other setting.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #11696 +/- ##
=======================================
Coverage 91.39% 91.39%
=======================================
Files 966 966
Lines 50050 50050
=======================================
Hits 45742 45742
Misses 4308 4308
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|

Uh oh!
There was an error while loading. Please reload this page.