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 6e2c0f9 commit d5a77b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
12 changes: 3 additions & 9 deletions src/controllers/AdminBackupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
* @license https://cms.skeeks.com/license/
* @author Semenov Alexander <[email protected]>
*/

namespace skeeks\cms\dbDumper\controllers;

use skeeks\cms\backend\BackendController;
use skeeks\cms\helpers\RequestResponse;
use skeeks\cms\modules\admin\controllers\AdminController;
use skeeks\cms\rbac\CmsManager;

/**
* @author Semenov Alexander <[email protected]>
Expand All @@ -20,15 +21,8 @@ public function init()
{
$this->name = \Yii::t('skeeks/dbDumper', "Backups");


$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
9 changes: 2 additions & 7 deletions src/controllers/AdminSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

use skeeks\cms\backend\BackendController;
use skeeks\cms\helpers\RequestResponse;
use skeeks\cms\modules\admin\controllers\AdminController;
use skeeks\cms\rbac\CmsManager;

/**
* @author Semenov Alexander <[email protected]>
Expand All @@ -22,12 +22,7 @@ public function init()
$this->name = \Yii::t('skeeks/dbDumper', "Settings");

$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
8 changes: 2 additions & 6 deletions src/controllers/AdminStructureController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace skeeks\cms\dbDumper\controllers;

use skeeks\cms\backend\BackendController;
use skeeks\cms\rbac\CmsManager;
use yii\data\ArrayDataProvider;

/**
Expand All @@ -21,12 +22,7 @@ public function init()
$this->name = \Yii::t('skeeks/dbDumper', "The structure of the database");

$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_ROOT_ACCESS;

parent::init();
}
Expand Down

0 comments on commit d5a77b8

Please sign in to comment.