API permission filtering — scope /projects, /notes, /boards by user permissions #250
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-api#250
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Type
Feature
Lineage
Depends on UserProjectPermission table (pal-e-api sibling issue).
Repo
forgejo_admin/pal-e-apiUser Story
As a stakeholder
I want to see only the projects and boards assigned to me
So that I'm not overwhelmed with content I don't need
Context
Once UserProjectPermission exists, the API must filter responses based on the authenticated user's permissions. Extract keycloak_sub from Bearer JWT, query UserProjectPermission, return only permitted projects/notes/boards. Public content (is_public=true) bypasses this filter. Superadmin bypasses all checks. See arch-dataflow-pal-e-app.
File Targets
Files to modify:
src/pal_e_docs/routes/projects.py— filter project list by user permissionssrc/pal_e_docs/routes/notes.py— filter notes by project permissionssrc/pal_e_docs/routes/boards.py— filter boards by project permissionssrc/pal_e_docs/deps.pyor similar — JWT extraction, permission check dependencyFiles NOT to touch:
Acceptance Criteria
Test Expectations
pytest tests/ -k test_permission_filterConstraints
Checklist
Related
project-pal-e-apparch-dataflow-pal-e-app