UNPKG

@clickup/ent-framework

Version:

A PostgreSQL graph-database-alike library with microsharding and row-level security

19 lines 680 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Require = void 0; const Rule_1 = require("./Rule"); /** * Returns TOLERATE if the predicate succeeds, otherwise DENY. * - Used mostly for write permission checks. * - This rule may still throw an exception if it's a wild one (i.e. not derived * from EntAccessError). */ class Require extends Rule_1.Rule { async evaluate(vc, input) { return (await this.predicate.check(vc, input)) ? { decision: "TOLERATE", rule: this, cause: null } : { decision: "DENY", rule: this, cause: null }; } } exports.Require = Require; //# sourceMappingURL=Require.js.map