Skip to content

Commit 154fa26

Browse files
authored
feat: add flexible EnforceContext constructor (casbin#354)
1 parent cf4dd31 commit 154fa26

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/org/casbin/jcasbin/util/EnforceContext.java

+7
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ public EnforceContext(String suffix) {
3232
this.rType = "r" + suffix;
3333
}
3434

35+
public EnforceContext(String pSuffix, String eSuffix, String mSuffix, String rSuffix) {
36+
this.pType = "p" + pSuffix;
37+
this.eType = "e" + eSuffix;
38+
this.mType = "m" + mSuffix;
39+
this.rType = "r" + rSuffix;
40+
}
41+
3542
public String getpType() {
3643
return pType;
3744
}

0 commit comments

Comments
 (0)