@zenstackhq/language 3.0.0-beta.6 → 3.0.0-beta.8
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/index.cjs +152 -114
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +105 -67
- package/dist/index.js.map +1 -1
- package/dist/utils.cjs +18 -21
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +2 -3
- package/dist/utils.d.ts +2 -3
- package/dist/utils.js +17 -19
- package/dist/utils.js.map +1 -1
- package/package.json +5 -5
- package/res/stdlib.zmodel +4 -4
package/res/stdlib.zmodel
CHANGED
|
@@ -666,7 +666,7 @@ attribute @@@deprecated(_ message: String)
|
|
|
666
666
|
* @param operation: comma-separated list of "create", "read", "update", "delete". Use "all" to denote all operations.
|
|
667
667
|
* @param condition: a boolean expression that controls if the operation should be allowed.
|
|
668
668
|
*/
|
|
669
|
-
attribute @@allow(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'delete'", "'all'"]), _ condition: Boolean)
|
|
669
|
+
attribute @@allow(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'post-update'","'delete'", "'all'"]), _ condition: Boolean)
|
|
670
670
|
|
|
671
671
|
/**
|
|
672
672
|
* Defines an access policy that allows the annotated field to be read or updated.
|
|
@@ -684,7 +684,7 @@ attribute @allow(_ operation: String @@@completionHint(["'create'", "'read'", "'
|
|
|
684
684
|
* @param operation: comma-separated list of "create", "read", "update", "delete". Use "all" to denote all operations.
|
|
685
685
|
* @param condition: a boolean expression that controls if the operation should be denied.
|
|
686
686
|
*/
|
|
687
|
-
attribute @@deny(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'delete'", "'all'"]), _ condition: Boolean)
|
|
687
|
+
attribute @@deny(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'post-update'","'delete'", "'all'"]), _ condition: Boolean)
|
|
688
688
|
|
|
689
689
|
/**
|
|
690
690
|
* Defines an access policy that denies the annotated field to be read or updated.
|
|
@@ -705,8 +705,8 @@ function check(field: Any, operation: String?): Boolean {
|
|
|
705
705
|
} @@@expressionContext([AccessPolicy])
|
|
706
706
|
|
|
707
707
|
/**
|
|
708
|
-
* Gets
|
|
708
|
+
* Gets entity's value before an update. Only valid when used in a "post-update" policy rule.
|
|
709
709
|
*/
|
|
710
|
-
function
|
|
710
|
+
function before(): Any {
|
|
711
711
|
} @@@expressionContext([AccessPolicy])
|
|
712
712
|
|