I have confirmed that the operator does in fact return the correct value. However, it is not making back from the coreEnforcer. This is what my stack trace looks like when running this:
matcher result should be boolean or number
at Enforcer.privateEnforce (/app/node_modules/casbin/lib/cjs/coreEnforcer.js:391:31)
at privateEnforce.next (<anonymous>)
at Object.generatorRunAsync (/app/node_modules/casbin/lib/cjs/util/util.js:154:41)
at async testEnforce (/app/test/casbin/user.test.ts:34:20)
at async /app/test/casbin/user.test.ts:25:9
I am running enforce with the following params:
const params = {
sub: "role::sales",
input: { sub, obj },
obj: '/user/123',
act: "ListUsers",
};
await e.enforce(params.input, params.sub, params.obj, params.act);
Here is what the matcher looks like:
[matchers]
m = g(r.sub, p.sub) && keyGet2(r.obj, p.obj, 'role')
and policy:
p, /user/:role, role::sales, ListUsers
I have confirmed that the operator does in fact return the correct value. However, it is not making back from the
coreEnforcer. This is what my stack trace looks like when running this:I am running enforce with the following params:
Here is what the matcher looks like:
and policy: