Add UserProjectPermission table + Alembic migration #249
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
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/pal-e-api#249
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
Standalone — scoped from pal-e-app project.
Repo
forgejo_admin/pal-e-apiUser Story
As an admin (Lucas)
I want a UserProjectPermission table mapping Keycloak users to projects with read/write permissions
So that I can control what each stakeholder sees
Context
pal-e-app needs project-scoped permissions for stakeholders (Marcus, Mom). The domain model (arch-domain-pal-e-app) defines a UserProjectPermission table with columns: id, keycloak_sub, project_id, permission (read|write), created_at. No local user table — keycloak_sub references the JWT sub claim.
File Targets
Files to modify or create:
src/pal_e_docs/models/— new UserProjectPermission SQLAlchemy modelalembic/versions/— new migration for the tableFiles NOT to touch:
Acceptance Criteria
Test Expectations
pytest tests/ -k test_permissionConstraints
Checklist
Related
project-pal-e-apparch-domain-pal-e-app