Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Dec 9, 2024
1 parent 9afa519 commit f4be647
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 4 additions & 0 deletions src/config/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
'data' => [

'settings' => [
'items' => [
'list' => [
'items' => [
[
"name" => ['skeeks/money', 'Currencies'],
Expand All @@ -20,6 +22,8 @@
],
],
],
],
],
],
],
],
Expand Down
12 changes: 4 additions & 8 deletions src/controllers/AdminCurrencyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use skeeks\cms\grid\BooleanColumn;
use skeeks\cms\money\Currency;
use skeeks\cms\money\models\MoneyCurrency;
use skeeks\cms\rbac\CmsManager;
use skeeks\yii2\form\fields\BoolField;
use yii\helpers\ArrayHelper;
/**
Expand All @@ -30,12 +31,7 @@ public function init()
$this->modelClassName = MoneyCurrency::class;

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

parent::init();
}
Expand Down Expand Up @@ -72,9 +68,9 @@ public function actions()
],
'columns' => [
'custom' => [
'attribute' => 'name',
'attribute' => 'name',
'viewAttribute' => 'asText',
'class' => DefaultActionColumn::class,
'class' => DefaultActionColumn::class,
],

'is_active' => [
Expand Down

0 comments on commit f4be647

Please sign in to comment.