diff --git a/src/main/java/org/casbin/jcasbin/main/DistributedEnforcer.java b/src/main/java/org/casbin/jcasbin/main/DistributedEnforcer.java index d057908c..639dc476 100644 --- a/src/main/java/org/casbin/jcasbin/main/DistributedEnforcer.java +++ b/src/main/java/org/casbin/jcasbin/main/DistributedEnforcer.java @@ -97,6 +97,28 @@ public DistributedEnforcer(String modelPath, String policyFile, boolean enableLo super(modelPath, policyFile, enableLog); } + /** + * DistributedEnforcer initializes an enforcer with a database adapter and an enable log flag. + * + * @param modelPath the path of the model file. + * @param adapter the adapter. + * @param enableLog whether to enable Casbin's log. + */ + public DistributedEnforcer(String modelPath, Adapter adapter, boolean enableLog) { + super(modelPath, adapter, enableLog); + } + + /** + * DistributedEnforcer initializes an enforcer with a model, a database adapter and an enable log flag. + * + * @param m the model. + * @param adapter the adapter. + * @param enableLog whether to enable Casbin's log. + */ + public DistributedEnforcer(Model m, Adapter adapter, boolean enableLog) { + super(m, adapter, enableLog); + } + /** * AddPolicySelf provides a method for dispatcher to add authorization rules to the current policy. * The function returns the rules affected and error.