Feature: Financial Role Access Control — Phase 5 (P3)
Story: US4 — Server-side page guards (defense-in-depth)
Update src/app/dashboard/financeiro/page.tsx:
- Import
requireRole from @/lib/auth
- Add
await requireRole('GERENTE') as the first statement inside FinanceiroPage default export, before the return statement that renders the Suspense wrapper
Note: Call at the default export level (not inside FinanceiroDataWrapper) so the redirect fires before any Suspense rendering begins.
Depends on: T005 (requireRole must exist)
Feature: Financial Role Access Control — Phase 5 (P3)
Story: US4 — Server-side page guards (defense-in-depth)
Update
src/app/dashboard/financeiro/page.tsx:requireRolefrom@/lib/authawait requireRole('GERENTE')as the first statement insideFinanceiroPagedefault export, before the return statement that renders the Suspense wrapperNote: Call at the default export level (not inside FinanceiroDataWrapper) so the redirect fires before any Suspense rendering begins.
Depends on: T005 (requireRole must exist)