Closed thoraj closed 2 years ago
@sagilio @xcaptain @huazhikui
@thoraj The first param of the EnforceWithMatcher
method is the context of matcher
, not the type.
e.EnforceWithMatcher("r.sub == p.sub && keyMatch(r.obj, p.obj) && regexMatch(r.act, p.act)","company_admin", "company_A", "manage").Should().BeTrue();
Thanks. I was able to sort out the issues.
I am having trouble trying to use multiple matchers in a model.
I have tried adding a second matcher to the model file, and I have also tried adding the second matcher in code.
The standard Enforce() call works OK, but the second throws and exception:
I have verified that the 'm' collection in the model in fact has two entries ('m' and 'm2').
Not sure what I'm doing wrong, or if multiple matchers is supposed to work in v1.11?