Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/plugins/policy/plugin.zmodel
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Defines an access policy that allows a set of operations when the given condition is true.
*
* @param operation: comma-separated list of "create", "read", "update", "post-update", " "delete". Use "all" to denote all operations.
* @param operation: comma-separated list of "create", "read", "update", "post-update", "delete". Use "all" to denote all operations.
* @param condition: a boolean expression that controls if the operation should be allowed.
*/
attribute @@allow(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'post-update'","'delete'", "'all'"]), _ condition: Boolean)
Expand Down
3 changes: 1 addition & 2 deletions packages/testtools/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { loadDocument } from '@zenstackhq/language';
import path from 'node:path';

export function loadDocumentWithPlugins(filePath: string) {
const pluginModelFiles = [path.resolve(__dirname, '../node_modules/@zenstackhq/plugin-policy/plugin.zmodel')];
const pluginModelFiles = [require.resolve('@zenstackhq/plugin-policy/plugin.zmodel')];
Comment thread
ymc9 marked this conversation as resolved.
return loadDocument(filePath, pluginModelFiles);
}