Resolve merge conflict in rbac.ts: keep PR branch logic
(try userId first, then fall back to staff.id) rather than
base branch's staff.id-only approach.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
GRO-153: /api/staff returned 403 for all staff because resolveStaffMiddleware
looked up by staff.userId (Better-Auth ID) but dev login sent staff.id (PK),
and existing staff records had userId=NULL.
Changes:
- resolveStaffMiddleware: try userId first, fall back to staff.id (dev mode)
- resolveStaffMiddleware: try userId first, fall back to oidcSub (production)
- GET /api/dev/users: include userId field for DevLoginSelector
- DevLoginSelector: send userId (not staff.id) as X-Dev-User-Id
- Migration 0018: backfill userId for known demo staff
Co-Authored-By: Paperclip <noreply@paperclip.ing>