@zenstackhq/plugin-policy 3.0.0-beta.34 → 3.0.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.
Files changed (2) hide show
  1. package/package.json +6 -6
  2. package/plugin.zmodel +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenstackhq/plugin-policy",
3
- "version": "3.0.0-beta.34",
3
+ "version": "3.0.0",
4
4
  "description": "ZenStack Policy Plugin",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -32,8 +32,8 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "ts-pattern": "^5.7.1",
35
- "@zenstackhq/orm": "3.0.0-beta.34",
36
- "@zenstackhq/common-helpers": "3.0.0-beta.34"
35
+ "@zenstackhq/common-helpers": "3.0.0",
36
+ "@zenstackhq/orm": "3.0.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "kysely": "~0.28.8"
@@ -41,9 +41,9 @@
41
41
  "devDependencies": {
42
42
  "@types/better-sqlite3": "^7.6.13",
43
43
  "@types/pg": "^8.0.0",
44
- "@zenstackhq/eslint-config": "3.0.0-beta.34",
45
- "@zenstackhq/vitest-config": "3.0.0-beta.34",
46
- "@zenstackhq/typescript-config": "3.0.0-beta.34"
44
+ "@zenstackhq/eslint-config": "3.0.0",
45
+ "@zenstackhq/typescript-config": "3.0.0",
46
+ "@zenstackhq/vitest-config": "3.0.0"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "tsc --noEmit && tsup-node",
package/plugin.zmodel CHANGED
@@ -33,9 +33,9 @@ attribute @@deny(_ operation: String @@@completionHint(["'create'", "'read'", "'
33
33
  // attribute @deny(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'delete'", "'all'"]), _ condition: Boolean)
34
34
 
35
35
  /**
36
- * Checks if the current user can perform the given operation on the given field.
36
+ * Delegates the access control decision to a relation. Only to-one relations are supported.
37
37
  *
38
- * @param field: The field to check access for
38
+ * @param field: The relation field to delegate to.
39
39
  * @param operation: The operation to check access for. Can be "read", "create", "update", "post-update", or "delete". If the operation is not provided,
40
40
  * it defaults the operation of the containing policy rule.
41
41
  */