Свойство |
Type |
Description |
|
$actions |
|
list of action IDs that this rule applies to. The comparison is case-sensitive.
If not set or empty, it means this rule applies to all actions. |
|
$allow |
|
whether this is an 'allow' rule or 'deny' rule. |
|
$controllers |
|
list of the controller IDs that this rule applies to. Each controller ID is prefixed with the module ID (if any).
The comparison is case-sensitive. If not set or empty, it means this rule applies to all controllers. |
|
$denyCallback |
|
a callback that will be called if this rule determines the access to
the current action should be denied. If not set, the behavior will be determined by
AccessControl.
The signature of the callback should be as follows:
php
function ($rule, $action)
where $rule is this rule, and $action is the current [[Action|action]] object. |
|
$ips |
|
list of user IP addresses that this rule applies to. An IP address
can contain the wildcard * at the end so that it matches IP addresses with the same prefix.
For example, '192.168.*' matches all IP addresses in the segment '192.168.'.
If not set or empty, it means this rule applies to all IP addresses. |
|
$matchCallback |
|
a callback that will be called to determine if the rule should be applied.
The signature of the callback should be as follows:
php
function ($rule, $action)
where $rule is this rule, and $action is the current [[Action|action]] object.
The callback should return a boolean value indicating whether this rule should be applied. |
|
$roles |
|
list of roles that this rule applies to. Two special roles are recognized, and
they are checked via [[User::isGuest]]:
- ?: matches a guest user (not authenticated yet)
- @: matches an authenticated user
If you are using RBAC (Role-Based Access Control), you may also specify role or permission names.
In this case, [[User::can()]] will be called to check access.
If this property is not set or empty, it means this rule applies to all roles. |
|
$verbs |
|
list of request methods (e.g. GET, POST) that this rule applies to.
If not set or empty, it means this rule applies to all request methods. |
|