We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebae535 commit ae96914Copy full SHA for ae96914
packages/runtime/src/enhancements/policy/handler.ts
@@ -1450,6 +1450,10 @@ export class PolicyProxyHandler<DbClient extends DbClientContract> implements Pr
1450
operation: PolicyCrudKind,
1451
fieldValues?: Record<string, number | string | boolean | null>
1452
): Promise<boolean> {
1453
+ return createDeferredPromise(() => this.doCheck(operation, fieldValues));
1454
+ }
1455
+
1456
+ private async doCheck(operation: PolicyCrudKind, fieldValues?: Record<string, number | string | boolean | null>) {
1457
let constraint = this.policyUtils.getCheckerConstraint(this.model, operation);
1458
if (typeof constraint === 'boolean') {
1459
return constraint;
0 commit comments