@warlock.js/access 5.39.1 → 5.40.0
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/CHANGELOG.md +6 -0
- package/llms-full.txt +1 -1
- package/llms.txt +1 -1
- package/package.json +7 -7
- package/skills/index.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to `@warlock.js/access` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
|
|
6
6
|
|
|
7
|
+
## 5.40.0 - 2026-10-29
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- The package skill description now names `cannot`, `canAll`, `canAny`, `authorize` and `setAccessConfig`, so agents find the full checking API from the skill listing alone.
|
|
12
|
+
|
|
7
13
|
## 5.34.3 - 2026-10-20
|
|
8
14
|
|
|
9
15
|
### Changed
|
package/llms-full.txt
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
## Package orientation
|
|
8
8
|
|
|
9
9
|
---
|
|
10
|
-
description: 'Authorization with RBAC and ABAC: `can`, `authorize`, `gate`, `gateAny`, `definePolicy`, `hasRole`, `access` and `AccessResolver`. Use for "check a permission", "only the owner can edit", route policies, tenant roles or custom permission storage. Not this package → @warlock.js/auth for login, tokens and user-type guards; @warlock.js/seal for request validation.'
|
|
10
|
+
description: 'Authorization with RBAC and ABAC: `can`, `cannot`, `canAll`, `canAny`, `authorize`, `gate`, `gateAny`, `definePolicy`, `hasRole`, `access`, `setAccessConfig` and `AccessResolver`. Use for "check a permission", "only the owner can edit", "403 forbidden", route policies, tenant roles or custom permission storage. Not this package → @warlock.js/auth for login, tokens and user-type guards; @warlock.js/seal for request validation.'
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
# @warlock.js/access
|
package/llms.txt
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
## Skills
|
|
8
8
|
|
|
9
|
-
- [Package orientation](@warlock.js/access/skills/index.md): Authorization with RBAC and ABAC: `can`, `authorize`, `gate`, `gateAny`, `definePolicy`, `hasRole`, `access` and `AccessResolver`. Use for "check a permission", "only the owner can edit", route policies, tenant roles or custom permission storage. Not this package → @warlock.js/auth for login, tokens and user-type guards; @warlock.js/seal for request validation.
|
|
9
|
+
- [Package orientation](@warlock.js/access/skills/index.md): Authorization with RBAC and ABAC: `can`, `cannot`, `canAll`, `canAny`, `authorize`, `gate`, `gateAny`, `definePolicy`, `hasRole`, `access`, `setAccessConfig` and `AccessResolver`. Use for "check a permission", "only the owner can edit", "403 forbidden", route policies, tenant roles or custom permission storage. Not this package → @warlock.js/auth for login, tokens and user-type guards; @warlock.js/seal for request validation.
|
|
10
10
|
- [check-permissions](@warlock.js/access/skills/check-permissions/SKILL.md): Check permissions in `@warlock.js/access` — `can` / `cannot` / `canAll` / `canAny` (boolean), `authorize` / `authorizeAll` / `authorizeAny` (throw 403), and the `gate` / `gateAny` / `gateAll` route middleware. Class-level vs instance-level (pass a `resource` to run its policy). TRIGGER: `can(`, `authorize(`, `canAll`, `canAny`, `gate`, `gateAny`, `gateAll`, "check a permission", "protect route by permission", "403 forbidden", "any vs all permissions". Skip: ownership / tenant conditions — the `define-policies` topic; role checks — the `manage-roles` topic.
|
|
11
11
|
- [configure-access](@warlock.js/access/skills/configure-access/SKILL.md): Configure `@warlock.js/access` — the REQUIRED `resolver` (the quickstart `DefaultAccessResolver` over a fixed code map vs the ejected, DB-backed `DatabaseAccessResolver`), `cache: { ttl }`, and the ambient tenant via the resolver's optional `resolveTenant()`. TRIGGER: `AccessConfigurations`, `config.access`, `src/config/access.ts`, "set up permissions", "DefaultAccessResolver", "DatabaseAccessResolver", "access cache ttl", "access tenant". Skip: checking permissions — the `check-permissions` topic; custom storage — the `implement-resolver` topic.
|
|
12
12
|
- [define-policies](@warlock.js/access/skills/define-policies/SKILL.md): ABAC conditions in `@warlock.js/access` — `definePolicy(permission, (user, resource, ctx) => boolean)` adds an instance-level rule (ownership / tenant / state) on top of the RBAC grant, evaluated when an authorization check carries a `resource`. TRIGGER: `definePolicy`, "ownership check", "only their own", "can edit this specific record", "ABAC", "policy", "resource-level permission", `authorize(user, perm, { resource })`. Skip: plain grant checks — the `check-permissions` topic.
|
package/package.json
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
"environment": "server"
|
|
6
6
|
},
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@warlock.js/auth": "5.
|
|
9
|
-
"@warlock.js/cache": "5.
|
|
10
|
-
"@warlock.js/cascade": "5.
|
|
11
|
-
"@warlock.js/core": "5.
|
|
12
|
-
"@warlock.js/logger": "5.
|
|
13
|
-
"@warlock.js/seal": "5.
|
|
8
|
+
"@warlock.js/auth": "5.40.0",
|
|
9
|
+
"@warlock.js/cache": "5.40.0",
|
|
10
|
+
"@warlock.js/cascade": "5.40.0",
|
|
11
|
+
"@warlock.js/core": "5.40.0",
|
|
12
|
+
"@warlock.js/logger": "5.40.0",
|
|
13
|
+
"@warlock.js/seal": "5.40.0"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"author": "hassanzohdy",
|
|
30
30
|
"license": "MIT",
|
|
31
|
-
"version": "5.
|
|
31
|
+
"version": "5.40.0",
|
|
32
32
|
"main": "./cjs/index.cjs",
|
|
33
33
|
"module": "./esm/index.mjs",
|
|
34
34
|
"types": "./esm/index.d.mts",
|
package/skills/index.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: 'Authorization with RBAC and ABAC: `can`, `authorize`, `gate`, `gateAny`, `definePolicy`, `hasRole`, `access` and `AccessResolver`. Use for "check a permission", "only the owner can edit", route policies, tenant roles or custom permission storage. Not this package → @warlock.js/auth for login, tokens and user-type guards; @warlock.js/seal for request validation.'
|
|
2
|
+
description: 'Authorization with RBAC and ABAC: `can`, `cannot`, `canAll`, `canAny`, `authorize`, `gate`, `gateAny`, `definePolicy`, `hasRole`, `access`, `setAccessConfig` and `AccessResolver`. Use for "check a permission", "only the owner can edit", "403 forbidden", route policies, tenant roles or custom permission storage. Not this package → @warlock.js/auth for login, tokens and user-type guards; @warlock.js/seal for request validation.'
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# @warlock.js/access
|