Skip to content

refactor(permissions): centralize permission checks#1

Merged
compgeniuses merged 2 commits into
mainfrom
dev
May 12, 2026
Merged

refactor(permissions): centralize permission checks#1
compgeniuses merged 2 commits into
mainfrom
dev

Conversation

@compgeniuses
Copy link
Copy Markdown
Contributor

@compgeniuses compgeniuses commented May 11, 2026

Description

  • Replace hardcoded role permissions in ProtectedRoute with reusable hasPermission utility
  • Update nav items and routes to use standardized PERMISSIONS enum values
  • Fix Accounts page permission check to use correct ACCOUNTS_MANAGE permission
  • Add type safety and explanatory comments to auth and route files
    Fixes #(issue)

Type of change

  • [-] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • [-] Unit tests
  • [-] Integration tests
  • [-] End-to-end tests
  • [-] Manual testing

Test Configuration:

  • Node.js version:
  • PostgreSQL version:
  • OS:

Checklist:

  • My code follows the project's code style
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if appropriate):

Additional context:

Add any other context about the pull request here.

- Replace hardcoded role permissions in ProtectedRoute with reusable hasPermission utility
- Update nav items and routes to use standardized PERMISSIONS enum values
- Fix Accounts page permission check to use correct ACCOUNTS_MANAGE permission
- Add type safety and explanatory comments to auth and route files
Add @vitest/coverage-v8 to support test coverage reporting. Add a new typecheck npm script alias for tsc -b type checks. Update vitest to version 4.1.6, and clean up package registry references in the lockfile.
@compgeniuses compgeniuses merged commit 2e7af7a into main May 12, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant