PAR-265
0
Finish the 'viewer' role: surface staff.audit as a grantable, LuckPerms-fed read-only oversight role
Pending ReleaseUnassignedEconomy ExplorerImprovement
Builds on PAR-98 (group+capability RBAC) and the reconciliation cron (PAR-99).
Problem: the financial-oversight capability exists internally as staff.audit but is never surfaced as a first-class, documented, grantable role. It's not in the user-facing roles doc, and there's no clear "viewer" identity for admins to attach to a LuckPerms-fed group.
Change — make viewer the canonical, user-facing financial-oversight role:
- Rename the capability
staff.audit→viewerin the explorer vocabulary (lib/auth/capabilities.ts), keepingstaff.auditas a recognized legacy alias (normalizeCapability) so existing group rows never silently lose access. isStaffnow keys offviewer; all existing financial gates (account history, ChestShop firm/item drilldowns, leaderboards) honor it unchanged.- Capability resolution in
getViewernormalizes stored strings (legacystaff.audit→viewer); the admin group editor shows the legacy row as the Viewer checkbox. - Header shows a
viewerbadge for a linked player who holds it without higher tier;/menotes the access. - Recon cron: generic membership sync already distributes any group; verified end-to-end (LuckPerms node →
explorer_group_membersource='luckperms' → linked player'sgetViewercaps →isStaff). Added an integration assertion for a LuckPerms-sourced viewer member. - Flyway
V21: data migration renaming existingexplorer_group_capability.capabilityrowsstaff.audit→viewer. - Docs:
docs/admin/roles.mddocuments the Viewer role and that it's granted via a (LuckPerms-fed) group, requiring the player to be linked. - Tests: capabilities/access unit tests + integration seed updated; legacy-alias test added.
Components: economy-explorer (primary), economy-flyway (V21 data migration).
Resources
- PR#2 Last major release ParadauxIO/hibernia-economy
- commitb29f54a Surface the read-only 'viewer' role across the explorer (PAR-265)ParadauxIO/hibernia-economy
Comments
No comments yet.
Activity
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- tesks changed status to Status → Pending Release
- ParadauxIO linked a commit — Commit b29f54a — Surface the read-only 'viewer' role across the explorer (PAR-265)
- tesks created the issue