Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/main/java/org/casbin/jcasbin/main/DistributedEnforcer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down