@happyvertical/smrt-users 0.51.13 → 0.51.15
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/README.md +17 -0
- package/dist/chunks/{TerminalAuthService-jJc-uqDc.js → TerminalAuthService-BynY2qhT.js} +599 -1121
- package/dist/chunks/TerminalAuthService-BynY2qhT.js.map +1 -0
- package/dist/collections/ResourceGrantCollection.d.ts +8 -0
- package/dist/collections/ResourceGrantCollection.d.ts.map +1 -0
- package/dist/collections/index.d.ts +1 -0
- package/dist/collections/index.d.ts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +222 -30
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +443 -1
- package/dist/models/ResourceGrant.d.ts +32 -0
- package/dist/models/ResourceGrant.d.ts.map +1 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/services/ResourceGrantService.d.ts +53 -0
- package/dist/services/ResourceGrantService.d.ts.map +1 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +332 -10
- package/dist/sveltekit.js +1 -1
- package/package.json +16 -16
- package/dist/chunks/TerminalAuthService-jJc-uqDc.js.map +0 -1
package/README.md
CHANGED
|
@@ -642,6 +642,23 @@ PermissionResolver evaluates permissions in order, where each level can add or r
|
|
|
642
642
|
Tenant-level inherited permissions are part of the effective permission set
|
|
643
643
|
returned by `resolvePermissions()` and `SessionService.loadSessionContext()`.
|
|
644
644
|
|
|
645
|
+
### Resource-scoped grants
|
|
646
|
+
|
|
647
|
+
Use `checkResourceOperationPermission()` where an application must restrict an
|
|
648
|
+
otherwise tenant-authorized operation to one exact resource. Pass the resource
|
|
649
|
+
tenant/type/id and an application-owned `verifyResource` callback. The guard
|
|
650
|
+
first requires the catalogued tenant permission, then requires an active exact
|
|
651
|
+
`ResourceGrant`; a grant for project A never matches project B. A resource deny
|
|
652
|
+
overrides a resource grant, while tenant and membership denies remain the
|
|
653
|
+
upstream gate. The verifier must load authoritative ownership and fail closed.
|
|
654
|
+
|
|
655
|
+
`ResourceGrantService` is the only public grant surface: generated REST and MCP
|
|
656
|
+
operations are disabled. Its caller supplies a catalogued administrative operation
|
|
657
|
+
for the bootstrap grant, avoiding a circular "already delegated" requirement.
|
|
658
|
+
Delegation requires a live, delegable parent owned by the actor and covering the
|
|
659
|
+
same tenant/resource/permission; chains are bounded and ancestor revocation
|
|
660
|
+
immediately invalidates every child at the next guard check.
|
|
661
|
+
|
|
645
662
|
### Hierarchical tenants
|
|
646
663
|
|
|
647
664
|
Tenants support parent-child trees (max depth 10). Two flags control inheritance: `cascadePermissions` (parent pushes down) and `inheritPermissions` (child accepts). Both must be true for permissions to flow.
|