Repository navigation
Make audit access a role option (opt-in for custom roles) - #322
Conversation
The legacy admin tier now always holds audit.read and pages.audit, and both are no longer owner-only, so delegated administrators may grant them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Rollout order: #322 → models release → bump models in hub-api#728 → merge hub-api#728 + hub-frontend#955. Admins see the Audit page only once the profile carries pages.audit (from the models legacy admin mapping). |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The audit page key grants pages.audit and audit.read. The built-in admin tier is served it; custom roles on the guest and editor tiers may list it (legacyTierOptionalPages) without the built-in tiers getting it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Scope extended (b4f8a67): audit is now a legacy page key |
Custom admin roles never listed the audit page, so the admin tier holds pages.audit and audit.read whatever its page list says. Guest and editor custom roles still opt in with the audit page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Decision 11-06: audit is always on for the admin tier (built-in and custom: custom admin roles never listed the audit page, so no migration). Guest/editor custom roles opt in with the |
Admin-tier custom roles hold the audit page unless LegacyRole.DisabledPages lists it, also roles created before the page existed. LegacyCustomRolePages is the one rule the access mapping and the user middleware share. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Update (882c7d2 / 544cbb59 / cd561c0d): audit is on by default for admin-based roles and switchable per role. Roles get a |
Custom roles on the admin tier hold the audit page only when they list it, like guest and editor roles. Drops LegacyCustomRolePages and LegacyRole.DisabledPages; the built-in admin tier still serves it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Changed on 2026-11-06: audit is now opt-in for every custom role, admin-based ones included. It is unticked by default and a role holds it only when its page list contains The default-on mechanism is gone ( Commit 8a08d33. |
What
audit.readandpages.audit. Neither has a legacy page key, so admins hold them whatever their page list says.audit.readandpages.auditare no longerOwnerOnly.OwnerOnlylists what the legacy admin tier never had, and admins now have audit access, so delegated administrators may grant it.Why
Admins should be able to open the Audit events page by default. hub-api builds the profile's
access.permissionsfrom this mapping, and the frontend shows the page only whenpages.auditis present.Tests
go test ./pkg/...passes. The pinned legacy admin sets and the owner-only list are updated.Consumers: hub-api (role check plus a models bump after release) and hub-frontend (route, navigation, alert audit button).
🤖 Generated with Claude Code