docs: correct module authorization comments
This commit is contained in:
@@ -25,8 +25,13 @@ const subjectUserId = parseEkklesiaUserId("subject_1");
|
||||
// (or, for listing, still return) an unregistered permission id rather than assuming registration.
|
||||
const permission = parsePermissionId("calendar.events.read");
|
||||
// A permission `CORE_PERMISSION_REGISTRY` actually declares, so tests that must reach
|
||||
// `store.createGrant`/`store.revokeGrant` can do so without also depending on module permission
|
||||
// registration, which does not exist yet.
|
||||
// `store.createGrant`/`store.revokeGrant` can do so. This suite exercises `createGrantsRoutes` in
|
||||
// isolation and intentionally injects `CORE_PERMISSION_REGISTRY` directly rather than a composed
|
||||
// platform registry — the routes have no notion of "Core" versus "module" permissions, they only
|
||||
// ever consult whichever registry they are given. Coverage proving a module-declared permission
|
||||
// works through the exact same route code lives in
|
||||
// `apps/api/tests/authorization-middleware.test.ts` (unit) and the "installed module permission
|
||||
// end-to-end" scenario in `apps/api/tests/api-http.integration.ts` (live).
|
||||
const registeredPermission = CORE_AUTHORIZATION_GRANTS_MANAGE;
|
||||
const grantId = parseGrantId("11111111-1111-1111-1111-111111111111");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user