Difficulty: Hard
Type: Feature
Summary
Add API endpoints for creating, updating, listing, and archiving access policies. This allows admin tools to manage policies without editing seed data or database records manually.
Current Behaviour
Policies are evaluated by the policy engine, but there is no complete admin API for policy management.
Expected Behaviour
Authorised admins should be able to manage policies through validated endpoints that enforce community and resource scoping.
Suggested Implementation
Create a policy service and route group under apps/access-api. Validate rule type, policy parameters, resource ID, community ID, and archived state. Update shared types and sdk-lite methods for client access.
Files or Areas Likely Affected
apps/access-api/src/routes.ts
apps/access-api/src/services/policyService.ts
apps/access-api/prisma/schema.prisma
packages/policy-engine/src/index.ts
packages/shared-types/src/index.ts
packages/sdk-lite/src/index.ts
Acceptance Criteria
Additional Notes
This should build on the structured policy model rather than replacing it.
Difficulty: Hard
Type: Feature
Summary
Add API endpoints for creating, updating, listing, and archiving access policies. This allows admin tools to manage policies without editing seed data or database records manually.
Current Behaviour
Policies are evaluated by the policy engine, but there is no complete admin API for policy management.
Expected Behaviour
Authorised admins should be able to manage policies through validated endpoints that enforce community and resource scoping.
Suggested Implementation
Create a policy service and route group under
apps/access-api. Validate rule type, policy parameters, resource ID, community ID, and archived state. Update shared types and sdk-lite methods for client access.Files or Areas Likely Affected
apps/access-api/src/routes.tsapps/access-api/src/services/policyService.tsapps/access-api/prisma/schema.prismapackages/policy-engine/src/index.tspackages/shared-types/src/index.tspackages/sdk-lite/src/index.tsAcceptance Criteria
Additional Notes
This should build on the structured policy model rather than replacing it.