@byline/auth 1.8.1 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abilities.d.ts +1 -1
- package/dist/actor.js +4 -4
- package/dist/context.d.ts +5 -4
- package/dist/session-provider.d.ts +1 -1
- package/package.json +1 -1
package/dist/abilities.d.ts
CHANGED
package/dist/actor.js
CHANGED
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
* The `Actor` union (`AdminAuth | UserAuth | null`) is the canonical shape
|
|
24
24
|
* carried on `RequestContext`. A `null` actor represents an
|
|
25
25
|
* unauthenticated request — only permitted on public read paths
|
|
26
|
-
* (`readMode === 'published'`)
|
|
27
|
-
* (
|
|
26
|
+
* (`readMode === 'published'`); service-layer enforcement is now in
|
|
27
|
+
* place (`assertActorCanPerform`, `assertAdminActor`).
|
|
28
28
|
*
|
|
29
29
|
* Ability keys are flat dotted strings (e.g. `collections.pages.publish`,
|
|
30
|
-
* `media.manage`). See AUTHN-AUTHZ
|
|
31
|
-
*
|
|
30
|
+
* `media.manage`). See docs/AUTHN-AUTHZ.md for the rationale and the
|
|
31
|
+
* registry that mints them.
|
|
32
32
|
*/
|
|
33
33
|
import { ERR_FORBIDDEN } from './errors.js';
|
|
34
34
|
/**
|
package/dist/context.d.ts
CHANGED
|
@@ -11,10 +11,11 @@ import { type Actor } from './actor.js';
|
|
|
11
11
|
* `document-lifecycle` service, `IDocumentQueries` method, `@byline/client`
|
|
12
12
|
* entry point, and collection hook.
|
|
13
13
|
*
|
|
14
|
-
* The auth subsystem populates `actor`; downstream code reads it.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* The auth subsystem populates `actor`; downstream code reads it.
|
|
15
|
+
* Service-layer enforcement is live: `assertActorCanPerform` runs at
|
|
16
|
+
* every `document-lifecycle` write entry and on `@byline/client` reads;
|
|
17
|
+
* `assertAdminActor` runs inside every admin-management `*Command`.
|
|
18
|
+
* See docs/AUTHN-AUTHZ.md for the present-state reference.
|
|
18
19
|
*
|
|
19
20
|
* `RequestContext` is intentionally independent of the existing
|
|
20
21
|
* `ReadContext` (populate / `afterRead` recursion guard) for now. Merging
|