Skip to content

Commit

Permalink
feat: add flexible EnforceContext constructor (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
pzet123 authored Aug 15, 2023
1 parent cf4dd31 commit 154fa26
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/org/casbin/jcasbin/util/EnforceContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ public EnforceContext(String suffix) {
this.rType = "r" + suffix;
}

public EnforceContext(String pSuffix, String eSuffix, String mSuffix, String rSuffix) {
this.pType = "p" + pSuffix;
this.eType = "e" + eSuffix;
this.mType = "m" + mSuffix;
this.rType = "r" + rSuffix;
}

public String getpType() {
return pType;
}
Expand Down

0 comments on commit 154fa26

Please sign in to comment.