mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-03 07:04:07 +01:00
* [ADD] Default permissions rewritten to make a more generic approach. Now it can manage multiple items/modules default values from the same view, so it's called Items Preset.
* [MOD] Code refactoring
This commit is contained in:
@@ -33,6 +33,7 @@ use SP\Modules\Web\Controllers\Helpers\Grid\CategoryGrid;
|
||||
use SP\Modules\Web\Controllers\Helpers\Grid\ClientGrid;
|
||||
use SP\Modules\Web\Controllers\Helpers\Grid\CustomFieldGrid;
|
||||
use SP\Modules\Web\Controllers\Helpers\Grid\FileGrid;
|
||||
use SP\Modules\Web\Controllers\Helpers\Grid\ItemPresetGrid;
|
||||
use SP\Modules\Web\Controllers\Helpers\Grid\PluginGrid;
|
||||
use SP\Modules\Web\Controllers\Helpers\Grid\TagGrid;
|
||||
use SP\Modules\Web\Controllers\Helpers\TabsGridHelper;
|
||||
@@ -42,6 +43,7 @@ use SP\Services\Account\AccountService;
|
||||
use SP\Services\Category\CategoryService;
|
||||
use SP\Services\Client\ClientService;
|
||||
use SP\Services\CustomField\CustomFieldDefService;
|
||||
use SP\Services\ItemPreset\ItemPresetService;
|
||||
use SP\Services\Plugin\PluginService;
|
||||
use SP\Services\Tag\TagService;
|
||||
|
||||
@@ -111,6 +113,10 @@ final class ItemManagerController extends ControllerBase
|
||||
$this->tabsGridHelper->addTab($this->getAccountsHistoryList());
|
||||
}
|
||||
|
||||
if ($this->checkAccess(Acl::ITEMPRESET)) {
|
||||
$this->tabsGridHelper->addTab($this->getItemPresetList());
|
||||
}
|
||||
|
||||
if ($this->checkAccess(Acl::PLUGIN)) {
|
||||
$this->tabsGridHelper->addTab($this->getPluginsList());
|
||||
}
|
||||
@@ -220,6 +226,20 @@ final class ItemManagerController extends ControllerBase
|
||||
->updatePager();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns API tokens data tab
|
||||
*
|
||||
* @return \SP\Html\DataGrid\DataGridTab
|
||||
* @throws \SP\Core\Exceptions\ConstraintException
|
||||
* @throws \SP\Core\Exceptions\QueryException
|
||||
*/
|
||||
protected function getItemPresetList()
|
||||
{
|
||||
return $this->dic->get(ItemPresetGrid::class)
|
||||
->getGrid($this->dic->get(ItemPresetService::class)->search($this->itemSearchData))
|
||||
->updatePager();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns plugins' data tab
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user