Configuring LmcRbacMvc
LmcRbacMvc is configured via the lmc_rbac
key in the application config.
This is typically achieved by creating
a config/autoload/lmcrbac.global.php
file. A sample configuration file is provided in the config/
folder.
warning
LmcRbacMvc and LmcRbac share the same config key 'lmc_rbac'
. This allow to configure LmcRbacMvc by adding its specific
configs to the same configuration file as LmcRbac.
Reference
Key | Type | Values | Description |
---|---|---|---|
guards | array | [] | Defines the guards to implement. Refer to the section on Guards. |
'protection_policy' | string | - GuardInterface::POLICY_ALLOW (default)- GuardInterface::POLICY_DENY | Defines the protection policy that guards will use when no rules are specified for the role. Refer to the Guards section. |
'unauthorized_strategy' | array map|null | Defaults to null | Defines the configuration for the UnAuthorized strategy. Refer to the Unauthorized Strategy section. |
'redirect_strategy' | array map|null | Defaults to null | Defines the configuration for the Redirect strategy. Refer to the Redirect Strategy section. |
'guard_manager' | array map | [] (default) | Guard Manager Plugin Manager configuration. Must follow a Service Manager configuration. |