1 | <?php |
||
20 | class AuthManager extends \yii\rbac\PhpManager |
||
21 | { |
||
22 | public $itemFile = '@hipanel/rbac/files/items.php'; |
||
23 | public $ruleFile = '@hipanel/rbac/files/rules.php'; |
||
24 | public $assignmentFile = '@hipanel/rbac/files/assignments.php'; |
||
25 | |||
26 | use SetterTrait; |
||
27 | |||
28 | /** |
||
29 | * We don't keep all the assignments, only persistent. |
||
30 | * @see persistAssignments |
||
31 | */ |
||
32 | 20 | protected function saveAssignments() |
|
35 | |||
36 | /** |
||
37 | * Does real assignments saving. |
||
38 | * The idea is to split persistent assignments from session only. |
||
39 | */ |
||
40 | public function persistAssignments() |
||
44 | |||
45 | 20 | public function checkAccess($userId, $permission, $params = []) |
|
54 | |||
55 | 2 | public function applyUserAssignments($userId) |
|
78 | } |
||
79 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.