InternalEnforcer class
InternalEnforcer = CoreEnforcer + Internal API.
- Inheritance
-
- Object
- CoreEnforcer
- InternalEnforcer
- Implementers
Constructors
Properties
- adapter ↔ Adapter
-
getter/setter pairinherited
- autoBuildRoleLinks ↔ bool
-
getter/setter pairinherited
- autoNotifyDispatcher ↔ bool
-
getter/setter pairinherited
- autoNotifyWatcher ↔ bool
-
getter/setter pairinherited
- autoSave ↔ bool
-
getter/setter pairinherited
- dispatcher ↔ Dispatcher?
-
getter/setter pairinherited
- eft ↔ Effector
-
getter/setter pairinherited
- fm ↔ FunctionMap
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- logger ↔ Logger
-
getter/setter pairinherited
- model ↔ Model
-
getter/setter pairinherited
- modelCount ↔ int
-
getter/setter pairinherited
- modelPath ↔ String
-
getter/setter pairinherited
- rm ↔ RoleManager
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- watcher ↔ Watcher?
-
getter/setter pairinherited
Methods
-
addPoliciesInternal(
String sec, String ptype, List< List< rules) → boolString> > - addPolicies adds multiple rules to the current policy.
-
addPolicyInternal(
String sec, String ptype, List< String> rule) → bool - addPolicy adds a rule to the current policy.
-
buildIncrementalRoleLinks(
PolicyOperations op, String ptype, List< List< rules) → voidString> > -
buildIncrementalRoleLinks provides incremental build the role inheritance relations.
op
Policy operations.ptype
policy type.rules
the rules. -
buildRoleLinks(
) → void -
Manually rebuild the role inheritance relations.
inherited
-
clearPolicy(
) → void -
Clears all policy.
inherited
-
enableAutoBuildRoleLinks(
bool autoBuildRoleLinks) → void -
Controls whether to save a policy rule automatically to the adapter when it is added or removed.
inherited
-
enableAutoSave(
bool autoSave) → void -
Controls whether to save a policy rule automatically to the adapter when it is added or removed.
inherited
-
enableEnforce(
bool enable) → void -
Changes the enforcing state of Casbin, when Casbin is disabled, all access will be allowed by the enforce() function.
inherited
-
enableLog(
bool enable) → void -
Changes whether to print Casbin log to the standard output.
inherited
-
enforce(
List rvals) → bool -
Returns whether a "subject" can access a "object" with the operation "action", input parameters are usually:
sub, obj, act
.inherited -
getAdapter(
) → Adapter -
Returns the current adapter.
inherited
-
getDomainIndex(
String ptype) → int -
getModel(
) → Model -
Returns the current model.
inherited
-
isAutoNotifyDispatcher(
) → bool -
inherited
-
isAutoNotifyWatcher(
) → bool -
inherited
-
isFiltered(
) → bool -
Returns if the loaded policy has been filtered.
inherited
-
loadFilteredPolicy(
dynamic filter) → void -
Reloads a filtered policy from file/database.
inherited
-
loadModel(
) → void -
Reloads the model from the model CONF file.
Because the policy is attached to a model, so the policy is invalidated
and needs to be reloaded by calling loadPolicy().
inherited
-
loadPolicy(
) → void -
Reloads the policy from file/database.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeFilteredPolicyInternal(
String sec, String ptype, int fieldIndex, List< String> fieldValues) → bool - removeFilteredPolicyInternal removes rules based on field filters from the current policy.
-
removePoliciesInternal(
String sec, String ptype, List< List< rules) → boolString> > - removePoliciesInternal removes rules from the current policy.
-
removePolicyInternal(
String sec, String ptype, List< String> rule) → bool - removePolicy removes a rule from the current policy.
-
savePolicy(
) → void -
Saves the current policy (usually after changed with Casbin API) back to file/database.
inherited
-
setAdapter(
Adapter adapter) → void -
Sets the current adapter.
inherited
-
setAutoNotifyDispatcher(
bool autoNotifyDispatcher) → void -
inherited
-
setAutoNotifyWatcher(
bool autoNotifyWatcher) → void -
inherited
-
setDispatcher(
Dispatcher dispatcher) → void -
Sets the current dispatcher.
inherited
-
setEffector(
Effector eft) → void -
Sets the current effector.
inherited
-
setModel(
Model model) → void -
setModel sets the current model.
inherited
-
setRoleManager(
RoleManager rm) → void -
Sets the current role manager.
inherited
-
setWatcher(
Watcher watcher) → void -
Sets the current watcher.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updatePolicyInternal(
String sec, String ptype, List< String> oldRule, List<String> newRule) → bool - updatePolicy updates an authorization rule from the current policy.
-
validateEnforce(
List< String> rvals) → bool -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited