fix(GRO-1822): add role check before /admin redirect — customers access portal #30
Reference in New Issue
Block a user
Delete Branch "fix/gro-1822-role-based-redirect"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
session.user.role === "staff"before redirecting authenticated users to/adminstaff) can access the customer portal at/?sessionId=is preservedRoot Cause
App.tsx lines 389-393 redirected all authenticated users to
/admin, regardless of role. When a customer logged in via Authentik SSO, they were caught in this redirect and couldn't access their portal.Fix
Added role check:
This ensures:
/admin✓/✓Test Plan
/(not/admin)/admin?sessionId=still works🤖 Generated with Claude Code