question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Loading using Adapter gives different results

See original GitHub issue

Hi, 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:closed
  • Created 3 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
hsluoyzcommented, Apr 30, 2020
0reactions
nodececommented, Apr 30, 2020

@shlomiv v4.5.0 has been published.

Thanks for your report.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found