mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-12 19:36:58 +01:00
* [ADD] Added URI signature for JS and CSS resources
* [MOD] Improved requests handling. It makes them more testing friendly * [MOD] Code refactoring
This commit is contained in:
@@ -30,7 +30,6 @@ use SP\Core\Events\EventMessage;
|
||||
use SP\Core\Exceptions\ValidationException;
|
||||
use SP\DataModel\UserData;
|
||||
use SP\Http\JsonResponse;
|
||||
use SP\Http\Request;
|
||||
use SP\Modules\Web\Controllers\Helpers\ItemsGridHelper;
|
||||
use SP\Modules\Web\Controllers\Traits\ItemTrait;
|
||||
use SP\Modules\Web\Controllers\Traits\JsonTrait;
|
||||
@@ -71,7 +70,7 @@ class UserController extends ControllerBase implements CrudControllerInterface
|
||||
}
|
||||
|
||||
$this->view->addTemplate('datagrid-table', 'grid');
|
||||
$this->view->assign('index', Request::analyzeInt('activetab', 0));
|
||||
$this->view->assign('index', $this->request->analyzeInt('activetab', 0));
|
||||
$this->view->assign('data', $this->getSearchGrid());
|
||||
|
||||
$this->returnJsonResponseData(['html' => $this->render()]);
|
||||
@@ -87,7 +86,7 @@ class UserController extends ControllerBase implements CrudControllerInterface
|
||||
protected function getSearchGrid()
|
||||
{
|
||||
$itemsGridHelper = $this->dic->get(ItemsGridHelper::class);
|
||||
$itemSearchData = $this->getSearchData($this->configData->getAccountCount());
|
||||
$itemSearchData = $this->getSearchData($this->configData->getAccountCount(), $this->request);
|
||||
|
||||
return $itemsGridHelper->updatePager($itemsGridHelper->getUsersGrid($this->userService->search($itemSearchData)), $itemSearchData);
|
||||
}
|
||||
@@ -261,7 +260,7 @@ class UserController extends ControllerBase implements CrudControllerInterface
|
||||
|
||||
try {
|
||||
if ($id === null) {
|
||||
$this->userService->deleteByIdBatch($this->getItemsIdFromRequest());
|
||||
$this->userService->deleteByIdBatch($this->getItemsIdFromRequest($this->request));
|
||||
|
||||
$this->deleteCustomFieldsForItem(Acl::USER, $id);
|
||||
|
||||
@@ -307,7 +306,7 @@ class UserController extends ControllerBase implements CrudControllerInterface
|
||||
|
||||
$id = $this->userService->create($itemData);
|
||||
|
||||
$this->addCustomFieldsForItem(Acl::USER, $id);
|
||||
$this->addCustomFieldsForItem(Acl::USER, $id, $this->request);
|
||||
|
||||
$this->eventDispatcher->notifyEvent('create.user',
|
||||
new Event($this, EventMessage::factory()
|
||||
@@ -368,7 +367,7 @@ class UserController extends ControllerBase implements CrudControllerInterface
|
||||
|
||||
$this->userService->update($itemData);
|
||||
|
||||
$this->updateCustomFieldsForItem(Acl::USER, $id);
|
||||
$this->updateCustomFieldsForItem(Acl::USER, $id, $this->request);
|
||||
|
||||
$this->eventDispatcher->notifyEvent('edit.user',
|
||||
new Event($this, EventMessage::factory()
|
||||
|
||||
Reference in New Issue
Block a user