Staff roles (viewer, operator, billing) and the console's Audit view
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f8fcecd640
commit
b60cf45adf
19 files changed
+352
-24
No files matched your search
+5
-2
@@ -17,8 +17,10 @@ type Nav struct {
|
||||
// Current is the page being shown, so its link is marked rather than
|
||||
// offered: "cluster", "people", "quotas", "usage", "mirror", "chat", "keys".
|
||||
Current string
|
||||
// Admin shows the administration links.
|
||||
// Admin shows the administration links, and Role which of them: a
|
||||
// billing role sees usage and quotas only.
|
||||
Admin bool
|
||||
Role string
|
||||
// Mirror and Quotas are whether those pages were mounted at all; usage is
|
||||
// mounted with quotas.
|
||||
Mirror, Quotas bool
|
||||
@@ -37,7 +39,8 @@ type navKey struct{}
|
||||
func (p *AccountPages) navFor(r *http.Request, user store.User, current string) Nav {
|
||||
n := Nav{
|
||||
Current: current,
|
||||
Admin: user.IsAdmin,
|
||||
Admin: user.Staff(),
|
||||
Role: user.StaffRole(),
|
||||
Mirror: p.hasMirror,
|
||||
Quotas: p.hasQuotas,
|
||||
Guard: p.hasGuard,
|
||||
|
||||
Reference in new issue
Block a user