Loading using Adapter gives different results
See original GitHub issueHi, it must be a silly mistake I am making:
const enforcer = await newEnforcer('default_model.txt', 'default_policy.txt', true);
const sub = ...
const obj = ...
const act = "read"
const a = await enforcer.enforce(sub, obj, act); // returns true
Succeeds, while loading the adapter separately fails:
const enforcer = await newEnforcer('default_model.txt', true);
enforcer.setAdapter(new FileAdapter("default_policy.txt"))
enforcer.loadPolicy()
const sub = ...
const obj = ...
const act = "read"
const a = await enforcer.enforce(sub, obj, act); // returns false
Any clues?
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
RecyclerView adapter taking wrong values - Stack Overflow
BTW I'm using this RecyclerView inside a Fragment which is loaded in a PageAdapter which is loaded in a ViewPager that is inside...
Read more >POWER SUPPLY BASICS - Wavelength Electronics
Loads drawing more current than the adapter is rated for can cause inconsistent results or device malfunction. Overloading the converter can lead to...
Read more >Loading custom adapters and 'output_attentions' for ... - GitHub
Adapter setup I am using (if any):. The problem arises when using: the official example scripts: (give details below); my own modified scripts: ......
Read more >There's internet access but websites are not loading, except ...
I had internet and was able to use Facebook, google, gmail, Instagram but most other sites wouldn't load. What solved my issue was...
Read more >Android Fundamentals: Working with the RecyclerView ...
The Android platform gives us two different types of views that can be leveraged to display lists of data—the ListView and the RecyclerView....
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
Merged: https://github.com/casbin/node-casbin/pull/146
@shlomiv
v4.5.0
has been published.Thanks for your report.