@zenstackhq/plugin-policy 3.0.0-beta.11 → 3.0.0-beta.13
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 +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -837,7 +837,7 @@ var PolicyHandler = class extends import_kysely3.OperationNodeTransformer {
|
|
|
837
837
|
if (constCondition === true) {
|
|
838
838
|
needCheckPreCreate = false;
|
|
839
839
|
} else if (constCondition === false) {
|
|
840
|
-
throw new import_runtime7.RejectedByPolicyError(mutationModel);
|
|
840
|
+
throw new import_runtime7.RejectedByPolicyError(mutationModel, import_runtime7.RejectedByPolicyReason.NO_ACCESS);
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
843
|
if (needCheckPreCreate) {
|
|
@@ -1200,7 +1200,7 @@ var PolicyHandler = class extends import_kysely3.OperationNodeTransformer {
|
|
|
1200
1200
|
};
|
|
1201
1201
|
const result = await proceed(preCreateCheck);
|
|
1202
1202
|
if (!result.rows[0]?.$condition) {
|
|
1203
|
-
throw new import_runtime7.RejectedByPolicyError(model);
|
|
1203
|
+
throw new import_runtime7.RejectedByPolicyError(model, import_runtime7.RejectedByPolicyReason.NO_ACCESS);
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
1206
|
unwrapCreateValueRows(node, model, fields, isManyToManyJoinTable) {
|