Conditions | 3 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | public function actionShow() |
||
34 | { |
||
35 | $auth = Yii::$app->get('authManager'); |
||
36 | |||
37 | echo "Permissions:\n"; |
||
38 | foreach ($auth->getItems(Item::TYPE_PERMISSION) as $name => $perm) { |
||
39 | echo "\t$perm->name $perm->description\n"; |
||
40 | } |
||
41 | |||
42 | echo "Roles:\n"; |
||
43 | foreach ($auth->getItems(Item::TYPE_ROLE) as $name => $role) { |
||
44 | $children = implode(',', array_keys($auth->getChildren($name))); |
||
45 | echo "\t$role->name [$children] $role->description\n"; |
||
46 | } |
||
47 | } |
||
48 | } |
||
49 |