Summary
Add a permission model that distinguishes read-only users from admins who can manage passes, members, guild settings, and integration configuration.
Current Behaviour
Management pages are grouped under the same dashboard navigation and do not appear to enforce action-level permissions. Once a user can access the dashboard, there is no fine-grained permission boundary for sensitive actions.
Expected Behaviour
Dashboard actions should be guarded by explicit permissions such as passes:write, members:write, guilds:write, and settings:write.
Suggested Implementation
Define a permission matrix and helper functions such as canManagePasses, canManageMembers, and canEditSettings. Add a mock session model with roles and permissions. Use the helpers to hide or disable actions and protect mutation handlers.
Files or Areas Likely Affected
apps/dashboard/lib/auth/
apps/dashboard/lib/permissions.ts
apps/dashboard/components/DashboardLayout.tsx
apps/dashboard/app/passes/page.tsx
apps/dashboard/app/members/page.tsx
apps/dashboard/app/settings/page.tsx
Acceptance Criteria
Additional Notes
This should not rely only on UI hiding. Live mode must still depend on backend enforcement for authoritative security.
Summary
Add a permission model that distinguishes read-only users from admins who can manage passes, members, guild settings, and integration configuration.
Current Behaviour
Management pages are grouped under the same dashboard navigation and do not appear to enforce action-level permissions. Once a user can access the dashboard, there is no fine-grained permission boundary for sensitive actions.
Expected Behaviour
Dashboard actions should be guarded by explicit permissions such as
passes:write,members:write,guilds:write, andsettings:write.Suggested Implementation
Define a permission matrix and helper functions such as
canManagePasses,canManageMembers, andcanEditSettings. Add a mock session model with roles and permissions. Use the helpers to hide or disable actions and protect mutation handlers.Files or Areas Likely Affected
apps/dashboard/lib/auth/apps/dashboard/lib/permissions.tsapps/dashboard/components/DashboardLayout.tsxapps/dashboard/app/passes/page.tsxapps/dashboard/app/members/page.tsxapps/dashboard/app/settings/page.tsxAcceptance Criteria
Additional Notes
This should not rely only on UI hiding. Live mode must still depend on backend enforcement for authoritative security.