feat(suppliers): admin-only route guard and navigation integration (#196) #202

Merged
yuris merged 2 commits from feat/phase-2-admin-auth-nav into main 2026-10-03 23:52:27 +00:00
Owner

Summary

Implements Phase 2 of Supplier Management (resolves #196):

  • Route protection with requireAdmin() in apps/management/app/(dashboard)/suppliers/layout.tsx
  • Added Supplier to desktop and mobile navigation in apps/management/components/dashboard-nav.tsx
  • Guarded navigation items with adminOnly: true so only admins see the link
  • Comprehensive tests in dashboard-nav.test.tsx, suppliers/layout.test.ts, and auth/guard.test.ts

Verification

  • 33 test files passed (582 tests)
  • pnpm verify:management clean with 0 errors
### Summary Implements Phase 2 of Supplier Management (resolves #196): - Route protection with `requireAdmin()` in `apps/management/app/(dashboard)/suppliers/layout.tsx` - Added Supplier to desktop and mobile navigation in `apps/management/components/dashboard-nav.tsx` - Guarded navigation items with `adminOnly: true` so only admins see the link - Comprehensive tests in `dashboard-nav.test.tsx`, `suppliers/layout.test.ts`, and `auth/guard.test.ts` ### Verification - 33 test files passed (582 tests) - `pnpm verify:management` clean with 0 errors
feat(suppliers): admin-only route guard and navigation integration (#196)
Some checks failed
Checks / test @garage/catalog (pull_request) Has been cancelled
Checks / test garage (pull_request) Has been cancelled
Checks / test garage-store (pull_request) Has been cancelled
Checks / typecheck apps/management (pull_request) Has been cancelled
Checks / typecheck apps/store (pull_request) Has been cancelled
Checks / lint (biome) (pull_request) Has been cancelled
4193ff81a8
fix(suppliers): redirect unauthorized users to login and non-admins to dashboard
All checks were successful
Checks / test garage (pull_request) Successful in 1m26s
Checks / test @garage/catalog (pull_request) Successful in 1m14s
Checks / test garage-store (pull_request) Successful in 1m18s
Checks / typecheck apps/management (pull_request) Successful in 1m38s
Checks / lint (biome) (pull_request) Successful in 11s
Checks / typecheck apps/store (pull_request) Successful in 1m20s
8073864003
yuris merged commit c4e807ef79 into main 2026-10-03 23:52:27 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
yuris/garage!202
No description provided.