Skip to content

Commit

Permalink
fix: for Enforcer pass FilteredAdapter will load all policy
Browse files Browse the repository at this point in the history
Signed-off-by: rong fengliang <1141591465@qq.com>
  • Loading branch information
rongfengliang committed Jun 9, 2021
1 parent be38837 commit c61a1ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/casbin/jcasbin/main/Enforcer.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public Enforcer(Model m, Adapter adapter) {

initialize();

if (this.adapter != null) {
// fix: Enforcer pass FilteredAdapter will load all policy
if (this.adapter != null && !isFiltered()) {
loadPolicy();
}
}
Expand Down

0 comments on commit c61a1ab

Please sign in to comment.