Overview
Administrators need a user management interface to view all users, filter by role, change roles, and suspend or delete accounts. Without this page, user management must be done directly in the database.
Background
File to create: frontend/app/(protected)/admin/users/page.tsx
Access: Admin role only (redirect non-admins to /dashboard)
Features:
- Searchable, paginated user table fetched from
GET /api/users (admin endpoint — BE-15)
- Columns: Name, Email, Role badge, Created date, Last login, Status (Active/Suspended)
- Filters: Role dropdown, Status dropdown
- Per-row actions:
- "Change role" dropdown (USER / ADMIN)
- "Suspend" / "Unsuspend" button
- "Delete" button (with confirmation modal)
- Bulk actions: select multiple users → bulk delete
Acceptance Criteria
Overview
Administrators need a user management interface to view all users, filter by role, change roles, and suspend or delete accounts. Without this page, user management must be done directly in the database.
Background
File to create:
frontend/app/(protected)/admin/users/page.tsxAccess: Admin role only (redirect non-admins to
/dashboard)Features:
GET /api/users(admin endpoint — BE-15)Acceptance Criteria
403 Forbiddenor redirects non-admin usersPATCH /api/users/:idand immediately updates the row