CoreEnforcer class
Defines the core functionality of an enforcer.
- Implementers
Constructors
Properties
- adapter ↔ Adapter
-
getter/setter pair
- autoBuildRoleLinks ↔ bool
-
getter/setter pair
- autoNotifyDispatcher ↔ bool
-
getter/setter pair
- autoNotifyWatcher ↔ bool
-
getter/setter pair
- autoSave ↔ bool
-
getter/setter pair
- dispatcher ↔ Dispatcher?
-
getter/setter pair
- eft ↔ Effector
-
getter/setter pair
- fm ↔ FunctionMap
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- logger ↔ Logger
-
getter/setter pair
- model ↔ Model
-
getter/setter pair
- modelCount ↔ int
-
getter/setter pair
- modelPath ↔ String
-
getter/setter pair
- rm ↔ RoleManager
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- watcher ↔ Watcher?
-
getter/setter pair
Methods
-
buildRoleLinks(
) → void - Manually rebuild the role inheritance relations.
-
clearPolicy(
) → void - Clears all policy.
-
enableAutoBuildRoleLinks(
bool autoBuildRoleLinks) → void - Controls whether to save a policy rule automatically to the adapter when it is added or removed.
-
enableAutoSave(
bool autoSave) → void - Controls whether to save a policy rule automatically to the adapter when it is added or removed.
-
enableEnforce(
bool enable) → void - Changes the enforcing state of Casbin, when Casbin is disabled, all access will be allowed by the enforce() function.
-
enableLog(
bool enable) → void - Changes whether to print Casbin log to the standard output.
-
enforce(
List rvals) → bool -
Returns whether a "subject" can access a "object" with the operation "action", input parameters are usually:
sub, obj, act
. -
getAdapter(
) → Adapter - Returns the current adapter.
-
getModel(
) → Model - Returns the current model.
-
isAutoNotifyDispatcher(
) → bool -
isAutoNotifyWatcher(
) → bool -
isFiltered(
) → bool - Returns if the loaded policy has been filtered.
-
loadFilteredPolicy(
dynamic filter) → void - Reloads a filtered policy from file/database.
-
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().
-
loadPolicy(
) → void - Reloads the policy from file/database.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
savePolicy(
) → void - Saves the current policy (usually after changed with Casbin API) back to file/database.
-
setAdapter(
Adapter adapter) → void - Sets the current adapter.
-
setAutoNotifyDispatcher(
bool autoNotifyDispatcher) → void -
setAutoNotifyWatcher(
bool autoNotifyWatcher) → void -
setDispatcher(
Dispatcher dispatcher) → void - Sets the current dispatcher.
-
setEffector(
Effector eft) → void - Sets the current effector.
-
setModel(
Model model) → void - setModel sets the current model.
-
setRoleManager(
RoleManager rm) → void - Sets the current role manager.
-
setWatcher(
Watcher watcher) → void - Sets the current watcher.
-
toString(
) → String -
A string representation of this object.
inherited
-
validateEnforce(
List< String> rvals) → bool
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited