Bug: Console 403 error fires on coach /admin redirect #186

Open
opened 2026-03-29 18:59:25 +00:00 by forgejo_admin · 0 comments
Contributor

Type

Bug

Lineage

Discovered during #142 E2E coach login validation.

Repo

forgejo_admin/westside-landing

What Broke

When a coach navigates to /admin, the app fires API calls to /admin/teams or /admin/dashboard before the role-based redirect kicks in, producing 403 console errors. The redirect itself works correctly.

Repro Steps

  1. Log in as any coach (e.g., cyprusbasketball32@live.com)
  2. Navigate to /admin in browser
  3. Observe redirect to /coach (correct behavior)
  4. Check browser console — 403 errors from premature admin API calls

Expected Behavior

Role should be checked before making admin API calls, avoiding the 403. The redirect should happen without API noise.

Environment

  • Cluster/namespace: prod
  • Service: westside-landing frontend

Acceptance Criteria

  • No 403 console errors when coach navigates to /admin
  • Redirect still works correctly
  • forgejo_admin/westside-landing#142 — discovered during validation
  • project-westside-basketball
### Type Bug ### Lineage Discovered during #142 E2E coach login validation. ### Repo `forgejo_admin/westside-landing` ### What Broke When a coach navigates to /admin, the app fires API calls to `/admin/teams` or `/admin/dashboard` before the role-based redirect kicks in, producing 403 console errors. The redirect itself works correctly. ### Repro Steps 1. Log in as any coach (e.g., cyprusbasketball32@live.com) 2. Navigate to /admin in browser 3. Observe redirect to /coach (correct behavior) 4. Check browser console — 403 errors from premature admin API calls ### Expected Behavior Role should be checked before making admin API calls, avoiding the 403. The redirect should happen without API noise. ### Environment - Cluster/namespace: prod - Service: westside-landing frontend ### Acceptance Criteria - [ ] No 403 console errors when coach navigates to /admin - [ ] Redirect still works correctly ### Related - `forgejo_admin/westside-landing#142` — discovered during validation - `project-westside-basketball`
Sign in to join this conversation.
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
ldraney/westside-app#186
No description provided.