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 fc18925 commit 19e89d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/config/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'menu' => [
'data' => [

'other' => [
'settings' => [
'items' => [
[
"name" => ['skeeks/money', 'Currencies'],
Expand All @@ -25,7 +25,7 @@
"image" => ['\skeeks\cms\money\assets\Asset', 'images/money_16_16.png'],
],

[
/*[
"name" => ['skeeks/money', 'Settings'],
"url" => [
"cms/admin-settings",
Expand All @@ -35,7 +35,7 @@
"activeCallback" => function ($adminMenuItem) {
return (bool)(\Yii::$app->request->getUrl() == $adminMenuItem->getUrl());
},
],
],*/
],
],
],
Expand Down
6 changes: 6 additions & 0 deletions src/controllers/AdminCurrencyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ public function init()
$this->modelClassName = MoneyCurrency::class;

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

parent::init();
}
Expand Down

0 comments on commit 19e89d3

Please sign in to comment.