Adds OAuth scope support to access tokens (PATs). Closes #298.
What changed:
- New
access_token_scopestable with FK toaccess_tokens - UI checkboxes for scope selection on token creation page
- Middleware enforces scope on every API request
- Token list shows scope badges
How to test:
make migrate
make dev
# Create a token at /settings/tokens with scope=repo:read only
curl -H "Authorization: Bearer $TOKEN" /api/repos
# Should 200. Then try POST — should 403.
Reviewers: this is the first time we're enforcing scopes, so the middleware change is the riskiest part.