<#1152 RBAC frontend: environment lookup by UUID o...
# osctrl
g
#1152 RBAC frontend: environment lookup by UUID on the nodes page, accurate users-page label Pull request opened by javuto RBAC frontend: environment lookup by UUID on the nodes page, accurate users-page label Follow-up to #1151, fixing the two items listed under its known limits. Problem 1. Nodes page hid controls from env admins.
NodesTablePage
matched the route's environment against environment names only. The command palette links to nodes by environment UUID, so on those routes the page couldn't resolve the environment. Env admins lost Tag…, Archive and Delete even though the server allows all three. 2. Misleading label on the users page. Rows a viewer can't act on carried the label "Superuser accounts can only be managed by a superuser". Read-only admins, who can view the users page but not change it, saw that label on ordinary user rows too. What changes • `NodesTablePage`: the environment is matched by name or UUID, the same way the queries and carves pages already do. • `UsersPage`: viewers without user-management rights get "You can't manage users". The superuser label appears only on superuser rows for viewers who can manage users. Security and operational impact • Frontend only, with no server or API changes. The server already allowed these actions; this only stops the UI hiding them. Validation • New test: an env admin on
/env/<uuid>/nodes
sees Tag selected nodes. • The read-only-admin users test now checks that ordinary rows say "You can't manage users" and carry no superuser label. • Both failed before the fix. •
cd frontend && npm test
(81 files, 772 tests),
npm run lint
and
npm run build
pass. • Not run: in-browser checks. jmpsec/osctrl