Add viewer role access controls #173
No reviewers
Labels
No labels
activitypub
admin
api
articles
auth
bug
cleanup
cli
comments
compatibility
config
contacts
database
deployment
design
dev-env
docs
documentation
email
enhancement
feature
federation
feed
homepage
implementation
integration
media
openapi
priority:high
priority:low
priority:medium
proof
public-routes
public-ui
release
safety
social
sources
status:active
status:canceled
status:done
status:inprogress
status:waiting
syndication
tailwind
template
test
web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erik/slugkit!173
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/task-cdb4c12b-viewer-access"
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
Verification
npm test --workspace @slugkit/template-site -- src/auth/__tests__/api-keys.test.ts src/routes/__tests__/admin-api-keys.test.ts src/routes/__tests__/admin-passkeys.test.ts src/routes/__tests__/admin-users.test.ts src/routes/__tests__/admin-activitypub.test.ts src/db/__tests__/migrations.test.tsnpm run build --workspace @slugkit/template-site./scripts/pre-pr.shPR Review: Approved
Summary
This PR makes the stored
viewerrole usable for non-admin settings access while keeping management-only areas admin-only. It adds API-key ownership, viewer read scopes, operation-aware bearer authorization, viewer API-key UI access, navigation filtering, migration coverage, tests, and auth documentation.Acceptance criteria
/settings/api-keysnow uses site-user session auth, lists viewer-owned keys, and creates viewer-owned keys.GETrequests for posts, sources, and contacts — met: viewer key test exercisesGET /api/v1/posts,/api/v1/sources, and/api/v1/contacts./admin/usersor/admin/activitypub— met for the current settings route family: existing viewer tests deny/settings/usersand/settings/activitypub; old/adminpages are not active routes in this codebase.template/site/src/auth/README.md.Blocking issues
None.
Warnings
None.
Verification
npm test --workspace @slugkit/template-site -- src/auth/__tests__/api-keys.test.ts src/routes/__tests__/admin-api-keys.test.ts src/routes/__tests__/admin-passkeys.test.ts src/routes/__tests__/admin-users.test.ts src/routes/__tests__/admin-activitypub.test.ts src/db/__tests__/migrations.test.tsnpm run build --workspace @slugkit/template-site./scripts/pre-pr.shVerdict
Approved. Stop at the human merge gate.
PR Review Worker Result