Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Apr 13, 2020
1 parent cbacdce commit b3748a3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/controllers/AdminPermissionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ public function init()
$this->modelClassName = CmsAuthItem::class;

$this->generateAccessActions = false;
$this->permissionName = CmsManager::PERMISSION_ROOT_ACCESS;
//$this->permissionName = CmsManager::PERMISSION_ROOT_ACCESS;
$this->accessCallback = function () {
if (!\Yii::$app->cms->site->is_default) {
return false;
}
return \Yii::$app->user->can(CmsManager::PERMISSION_ROOT_ACCESS);
};

parent::init();
}
Expand Down
8 changes: 7 additions & 1 deletion src/controllers/AdminRoleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ public function init()
$this->modelClassName = CmsAuthItem::class;

$this->generateAccessActions = false;
$this->permissionName = CmsManager::PERMISSION_ROOT_ACCESS;
//$this->permissionName = CmsManager::PERMISSION_ROOT_ACCESS;
$this->accessCallback = function () {
if (!\Yii::$app->cms->site->is_default) {
return false;
}
return \Yii::$app->user->can(CmsManager::PERMISSION_ROOT_ACCESS);
};

parent::init();
}
Expand Down

0 comments on commit b3748a3

Please sign in to comment.