Skip to content

Commit 2244bc2

Browse files
committed
chore(policy): inject auth guard for 'list' operation in policy utils
1 parent 48e3eb6 commit 2244bc2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/runtime/src/enhancements/node/policy/policy-utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,11 @@ export class PolicyUtil extends QueryUtils {
612612
return false;
613613
}
614614

615+
if (!this.injectAuthGuardAsWhere(db, injected, model, 'list')) {
616+
args.where = this.makeFalse();
617+
return false;
618+
}
619+
615620
if (args.where) {
616621
// inject into fields:
617622
// to-many: some/none/every

0 commit comments

Comments
 (0)