Allow the explaination in `enforceEx` and `enforceExWithMatcher` methods in the CoreEnforcer to be accessed externally
See original GitHub issueThe current implementation of the CoreEnforcer prints the explanation on the log but does not allow it to be accessed externally.
The methods should allow the explanation to be passed externally. The below two methods should be
public boolean enforceEx(List<String> explain, Object... rvals) {
return enforce("", explain, rvals);
}
public boolean enforceExWithMatcher(String matcher, List<String> explain, Object... rvals) {
return enforce(matcher, explain, rvals);
}
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Core Enforcer (move) - Bulbapedia
Core Enforcer (Japanese: コアパニッシャー Core Punisher) is a damage-dealing Dragon-type move introduced in Generation VII. It is one of the signature moves ...
Read more >Casbin Easy Tasks for Beginners/Student Applicants - GitHub
enforceSync ignores subject, always returns true if policy exists for object and method. node-casbin#292 opened by FabianSellmann enhancement
Read more >Core Enforcer - Pokémon Rulings Compendium
So I think I can use Zygarde's "Core Enforcer" attack without a Fairy energy attached, but what about the part of the attack...
Read more >Why did core enforcer have to be a special attack? - GameFAQs
Holy s*** I am aware that it is a special attack and therefore looks like one. I'm saying I wish it was a...
Read more >Core Enforcer | SM | Smogon Strategy Pokedex
If the user moves after the target, the target's Ability is rendered ineffective as long as it remains active. If the target uses...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You don’t have to make any changes to
Hit Policy:
. The actual explanation is never returned back in jcasbin. Python or Go versions return multiple values with explanations back. https://github.com/casbin/pycasbin/blob/6f6b1279cddef182ddce98a8c806130d67666f91/casbin/core_enforcer.py#L459 https://github.com/casbin/casbin/blob/63b2757cc60362d974921cb9065809b617d8b527/enforcer.go#L707However, jcasbin only logs the
Hit policy:
and does not expose the explanation. If you look at current implementation belowBoth enforceEx, enforceExWithMatcher print the
Hit policy:
in the log and never expose an explanation.The above enforceEx, enforceExWithMatcher methods simply should let an explanation be passed as
The business necessity is that the policy is dynamically populated from AD and contains metadata at the end. These metadata are required for compliance and some critical business rules.
the example policy will look like p, bob, data2, write, sensitivity, pii, mask
🎉 This issue has been resolved in version 1.31.1 🎉
The release is available on:
v1.31.1
Your semantic-release bot 📦🚀