Skip to content

Commit

Permalink
updated treeview toolbar settings permission check
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Stebe committed Mar 1, 2017
1 parent 00a3778 commit aee076c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions views/default/index.php
Expand Up @@ -41,10 +41,15 @@

// check module permissions
$settingPermission = false;
foreach (\Yii::$app->getModule('settings')->accessRoles as $role) {
$settingPermission = \Yii::$app->user->can($role);
if (\Yii::$app->getModule('settings')->accessRoles === null) {
$settingPermission = true;
} else {
foreach (\Yii::$app->getModule('settings')->accessRoles as $role) {
$settingPermission = \Yii::$app->user->can($role);
}
}


$settings = [
'icon' => 'cogs',
'url' => ['/settings', 'SettingSearch' => ['section' => 'pages']],
Expand Down

0 comments on commit aee076c

Please sign in to comment.