From 2b91186ae95bec51a36c0919485700eb17cf4f55 Mon Sep 17 00:00:00 2001 From: nuxsmin Date: Tue, 20 Mar 2018 16:10:05 +0100 Subject: [PATCH] * [ADD] API categories management * [ADD] API clients management * [ADD] API tags management * [FIX] Restore missing method --- .../api/Controllers/AccountController.php | 1 - .../api/Controllers/CategoryController.php | 185 ++++++++++++++++++ .../api/Controllers/ClientController.php | 184 +++++++++++++++++ .../api/Controllers/ControllerBase.php | 1 + app/modules/api/Controllers/TagController.php | 179 +++++++++++++++++ .../web/Controllers/AuthTokenController.php | 10 +- composer.lock | 31 +-- lib/SP/Services/Api/ApiService.php | 40 ++-- .../Services/AuthToken/AuthTokenService.php | 35 ++++ 9 files changed, 632 insertions(+), 34 deletions(-) create mode 100644 app/modules/api/Controllers/CategoryController.php create mode 100644 app/modules/api/Controllers/ClientController.php create mode 100644 app/modules/api/Controllers/TagController.php diff --git a/app/modules/api/Controllers/AccountController.php b/app/modules/api/Controllers/AccountController.php index 8b7185d4..e3e74158 100644 --- a/app/modules/api/Controllers/AccountController.php +++ b/app/modules/api/Controllers/AccountController.php @@ -182,7 +182,6 @@ class AccountController extends ControllerBase try { $this->setupApi(ActionsInterface::ACCOUNT_DELETE); - $accountId = $this->apiService->getParamInt('id', true); $accountDetails = $this->accountService->getById($accountId)->getAccountVData(); diff --git a/app/modules/api/Controllers/CategoryController.php b/app/modules/api/Controllers/CategoryController.php new file mode 100644 index 00000000..ba774097 --- /dev/null +++ b/app/modules/api/Controllers/CategoryController.php @@ -0,0 +1,185 @@ +. + */ + +namespace SP\Modules\Api\Controllers; + +use SP\Core\Acl\ActionsInterface; +use SP\Core\Events\Event; +use SP\Core\Events\EventMessage; +use SP\DataModel\CategoryData; +use SP\DataModel\ItemSearchData; +use SP\Services\Api\ApiResponse; +use SP\Services\Category\CategoryService; + + +/** + * Class CategoryController + * @package SP\Modules\Api\Controllers + */ +class CategoryController extends ControllerBase +{ + /** + * @var CategoryService + */ + protected $categoryService; + + /** + * viewAction + */ + public function viewAction() + { + try { + $this->setupApi(ActionsInterface::CATEGORY_VIEW); + + $id = $this->apiService->getParamInt('id', true); + $categoryData = $this->categoryService->getById($id); + + $this->eventDispatcher->notifyEvent('show.category', + new Event($this) + ); + + $this->returnResponse(new ApiResponse($categoryData)); + } catch (\Exception $e) { + $this->returnResponseException($e); + + processException($e); + } + } + + /** + * createAction + */ + public function createAction() + { + try { + $this->setupApi(ActionsInterface::CATEGORY_CREATE); + + $categoryData = new CategoryData(); + $categoryData->setName($this->apiService->getParamString('name', true)); + $categoryData->setDescription($this->apiService->getParamString('description')); + + $id = $this->categoryService->create($categoryData); + + $this->eventDispatcher->notifyEvent('create.category', + new Event($this, EventMessage::factory() + ->addDescription(__u('Categoría creada')) + ->addDetail(__u('Categoría'), $categoryData->getName())) + ); + + $this->returnResponse(new ApiResponse(__('Categoría creada'), ApiResponse::RESULT_SUCCESS, $id)); + } catch (\Exception $e) { + $this->returnResponseException($e); + + processException($e); + } + } + + /** + * editAction + */ + public function editAction() + { + try { + $this->setupApi(ActionsInterface::CATEGORY_EDIT); + + $categoryData = new CategoryData(); + $categoryData->setId($this->apiService->getParamInt('id', true)); + $categoryData->setName($this->apiService->getParamString('name', true)); + $categoryData->setDescription($this->apiService->getParamString('description')); + + $this->categoryService->update($categoryData); + + $this->eventDispatcher->notifyEvent('edit.category', + new Event($this, EventMessage::factory() + ->addDescription(__u('Categoría actualizada')) + ->addDetail(__u('Categoría'), $categoryData->getName())) + ); + + $this->returnResponse(new ApiResponse(__('Categoría actualizada'), ApiResponse::RESULT_SUCCESS, $categoryData->getId())); + } catch (\Exception $e) { + $this->returnResponseException($e); + + processException($e); + } + } + + /** + * deleteAction + */ + public function deleteAction() + { + try { + $this->setupApi(ActionsInterface::CATEGORY_DELETE); + + $id = $this->apiService->getParamInt('id', true); + + $categoryData = $this->categoryService->getById($id); + + $this->categoryService->delete($id); + + $this->eventDispatcher->notifyEvent('edit.category', + new Event($this, EventMessage::factory() + ->addDescription(__u('Categoría eliminada')) + ->addDetail(__u('Categoría'), $categoryData->getName())) + ); + + $this->returnResponse(new ApiResponse(__('Categoría eliminada'), ApiResponse::RESULT_SUCCESS, $id)); + } catch (\Exception $e) { + $this->returnResponseException($e); + + processException($e); + } + } + + /** + * searchAction + */ + public function searchAction() + { + try { + $this->setupApi(ActionsInterface::CATEGORY_SEARCH); + + $itemSearchData = new ItemSearchData(); + $itemSearchData->setSeachString($this->apiService->getParamString('text')); + $itemSearchData->setLimitCount($this->apiService->getParamInt('count', false, self::SEARCH_COUNT_ITEMS)); + + $this->eventDispatcher->notifyEvent('search.category', new Event($this)); + + $this->returnResponse(new ApiResponse($this->categoryService->search($itemSearchData))); + } catch (\Exception $e) { + $this->returnResponseException($e); + + processException($e); + } + } + + /** + * @throws \DI\DependencyException + * @throws \DI\NotFoundException + */ + protected function initialize() + { + $this->categoryService = $this->dic->get(CategoryService::class); + } +} \ No newline at end of file diff --git a/app/modules/api/Controllers/ClientController.php b/app/modules/api/Controllers/ClientController.php new file mode 100644 index 00000000..a6ab98ca --- /dev/null +++ b/app/modules/api/Controllers/ClientController.php @@ -0,0 +1,184 @@ +. + */ + +namespace SP\Modules\Api\Controllers; + +use SP\Core\Acl\ActionsInterface; +use SP\Core\Events\Event; +use SP\Core\Events\EventMessage; +use SP\DataModel\ClientData; +use SP\DataModel\ItemSearchData; +use SP\Services\Api\ApiResponse; +use SP\Services\Client\ClientService; + +/** + * Class ClientController + * @package SP\Modules\Api\Controllers + */ +class ClientController extends ControllerBase +{ + /** + * @var ClientService + */ + protected $clientService; + + /** + * viewAction + */ + public function viewAction() + { + try { + $this->setupApi(ActionsInterface::CLIENT_VIEW); + + $id = $this->apiService->getParamInt('id', true); + $client = $this->clientService->getById($id); + + $this->eventDispatcher->notifyEvent('show.client', new Event($this)); + + $this->returnResponse(new ApiResponse($client)); + } catch (\Exception $e) { + $this->returnResponseException($e); + + processException($e); + } + } + + /** + * createAction + */ + public function createAction() + { + try { + $this->setupApi(ActionsInterface::CLIENT_CREATE); + + $clientData = new ClientData(); + $clientData->setName($this->apiService->getParamString('name', true)); + $clientData->setDescription($this->apiService->getParamString('description')); + $clientData->setIsGlobal($this->apiService->getParamInt('global')); + + $clientId = $this->clientService->create($clientData); + + $this->eventDispatcher->notifyEvent('create.client', + new Event($this, EventMessage::factory() + ->addDescription(__u('Cliente creado')) + ->addDetail(__u('Cliente'), $clientData->getName())) + ); + + $this->returnResponse(new ApiResponse(__('Cliente creado'), ApiResponse::RESULT_SUCCESS, $clientId)); + } catch (\Exception $e) { + $this->returnResponseException($e); + + processException($e); + } + } + + /** + * editAction + */ + public function editAction() + { + try { + $this->setupApi(ActionsInterface::CLIENT_EDIT); + + $clientData = new ClientData(); + $clientData->setId($this->apiService->getParamInt('id', true)); + $clientData->setName($this->apiService->getParamString('name', true)); + $clientData->setDescription($this->apiService->getParamString('description')); + $clientData->setIsGlobal($this->apiService->getParamInt('global')); + + $this->clientService->update($clientData); + + $this->eventDispatcher->notifyEvent('edit.client', + new Event($this, EventMessage::factory() + ->addDescription(__u('Cliente actualizado')) + ->addDetail(__u('Cliente'), $clientData->getName())) + ); + + $this->returnResponse(new ApiResponse(__('Cliente actualizado'), ApiResponse::RESULT_SUCCESS, $clientData->getId())); + } catch (\Exception $e) { + $this->returnResponseException($e); + + processException($e); + } + } + + /** + * deleteAction + */ + public function deleteAction() + { + try { + $this->setupApi(ActionsInterface::CLIENT_DELETE); + + $id = $this->apiService->getParamInt('id', true); + + $clientData = $this->clientService->getById($id); + + $this->clientService->delete($id); + + $this->eventDispatcher->notifyEvent('edit.client', + new Event($this, EventMessage::factory() + ->addDescription(__u('Cliente eliminado')) + ->addDetail(__u('Cliente'), $clientData->getName())) + ); + + $this->returnResponse(new ApiResponse(__('Cliente eliminado'), ApiResponse::RESULT_SUCCESS, $id)); + } catch (\Exception $e) { + $this->returnResponseException($e); + + processException($e); + } + } + + /** + * searchAction + */ + public function searchAction() + { + try { + $this->setupApi(ActionsInterface::CLIENT_SEARCH); + + $itemSearchData = new ItemSearchData(); + $itemSearchData->setSeachString($this->apiService->getParamString('text')); + $itemSearchData->setLimitCount($this->apiService->getParamInt('count', false, self::SEARCH_COUNT_ITEMS)); + + $this->eventDispatcher->notifyEvent('search.client', new Event($this)); + + $this->returnResponse(new ApiResponse($this->clientService->search($itemSearchData))); + } catch (\Exception $e) { + $this->returnResponseException($e); + + processException($e); + } + } + + /** + * @throws \DI\DependencyException + * @throws \DI\NotFoundException + */ + protected function initialize() + { + $this->clientService = $this->dic->get(ClientService::class); + } +} \ No newline at end of file diff --git a/app/modules/api/Controllers/ControllerBase.php b/app/modules/api/Controllers/ControllerBase.php index 8667ec1d..e92a706d 100644 --- a/app/modules/api/Controllers/ControllerBase.php +++ b/app/modules/api/Controllers/ControllerBase.php @@ -41,6 +41,7 @@ use SP\Services\Api\JsonRpcResponse; */ abstract class ControllerBase { + const SEARCH_COUNT_ITEMS = 25; /** * @var Container */ diff --git a/app/modules/api/Controllers/TagController.php b/app/modules/api/Controllers/TagController.php new file mode 100644 index 00000000..7e1db56f --- /dev/null +++ b/app/modules/api/Controllers/TagController.php @@ -0,0 +1,179 @@ +. + */ + +namespace SP\Modules\Api\Controllers; + +use SP\Core\Acl\ActionsInterface; +use SP\Core\Events\Event; +use SP\Core\Events\EventMessage; +use SP\DataModel\ItemSearchData; +use SP\DataModel\TagData; +use SP\Services\Api\ApiResponse; +use SP\Services\Tag\TagService; + +/** + * Class TagController + * @package SP\Modules\Api\Controllers + */ +class TagController extends ControllerBase +{ + /** + * @var TagService + */ + protected $tagService; + + /** + * viewAction + */ + public function viewAction() + { + try { + $this->setupApi(ActionsInterface::TAG_VIEW); + + $id = $this->apiService->getParamInt('id', true); + + $this->eventDispatcher->notifyEvent('show.tag', new Event($this)); + + $this->returnResponse(new ApiResponse($this->tagService->getById($id))); + } catch (\Exception $e) { + $this->returnResponseException($e); + + processException($e); + } + } + + /** + * createAction + */ + public function createAction() + { + try { + $this->setupApi(ActionsInterface::TAG_CREATE); + + $tagData = new TagData(); + $tagData->setName($this->apiService->getParamString('name', true)); + + $id = $this->tagService->create($tagData); + + $this->eventDispatcher->notifyEvent('create.tag', + new Event($this, EventMessage::factory() + ->addDescription(__u('Etiqueta creada')) + ->addDetail(__u('Etiqueta'), $tagData->getName())) + ); + + $this->returnResponse(new ApiResponse(__('Etiqueta creada'), ApiResponse::RESULT_SUCCESS, $id)); + } catch (\Exception $e) { + $this->returnResponseException($e); + + processException($e); + } + } + + /** + * editAction + */ + public function editAction() + { + try { + $this->setupApi(ActionsInterface::TAG_EDIT); + + $tagData = new TagData(); + $tagData->setId($this->apiService->getParamInt('id', true)); + $tagData->setName($this->apiService->getParamString('name', true)); + + $this->tagService->update($tagData); + + $this->eventDispatcher->notifyEvent('edit.tag', + new Event($this, EventMessage::factory() + ->addDescription(__u('Etiqueta actualizada')) + ->addDetail(__u('Etiqueta'), $tagData->getName())) + ); + + $this->returnResponse(new ApiResponse(__('Etiqueta actualizada'), ApiResponse::RESULT_SUCCESS, $tagData->getId())); + } catch (\Exception $e) { + $this->returnResponseException($e); + + processException($e); + } + } + + /** + * deleteAction + */ + public function deleteAction() + { + try { + $this->setupApi(ActionsInterface::TAG_DELETE); + + $id = $this->apiService->getParamInt('id', true); + + $tagData = $this->tagService->getById($id); + + $this->tagService->delete($id); + + $this->eventDispatcher->notifyEvent('edit.tag', + new Event($this, EventMessage::factory() + ->addDescription(__u('Etiqueta eliminada')) + ->addDetail(__u('Etiqueta'), $tagData->getName())) + ); + + $this->returnResponse(new ApiResponse(__('Etiqueta eliminada'), ApiResponse::RESULT_SUCCESS, $id)); + } catch (\Exception $e) { + $this->returnResponseException($e); + + processException($e); + } + } + + /** + * searchAction + */ + public function searchAction() + { + try { + $this->setupApi(ActionsInterface::TAG_SEARCH); + + $itemSearchData = new ItemSearchData(); + $itemSearchData->setSeachString($this->apiService->getParamString('text')); + $itemSearchData->setLimitCount($this->apiService->getParamInt('count', false, self::SEARCH_COUNT_ITEMS)); + + $this->eventDispatcher->notifyEvent('search.tag', new Event($this)); + + $this->returnResponse(new ApiResponse($this->tagService->search($itemSearchData))); + } catch (\Exception $e) { + $this->returnResponseException($e); + + processException($e); + } + } + + /** + * @throws \DI\DependencyException + * @throws \DI\NotFoundException + */ + protected function initialize() + { + $this->tagService = $this->dic->get(TagService::class); + } +} \ No newline at end of file diff --git a/app/modules/web/Controllers/AuthTokenController.php b/app/modules/web/Controllers/AuthTokenController.php index 3ddd4e56..227b9c28 100644 --- a/app/modules/web/Controllers/AuthTokenController.php +++ b/app/modules/web/Controllers/AuthTokenController.php @@ -32,7 +32,6 @@ use SP\Core\Exceptions\ValidationException; use SP\DataModel\AuthTokenData; use SP\Http\JsonResponse; use SP\Http\Request; -use SP\Mgmt\ApiTokens\ApiTokensUtil; use SP\Modules\Web\Controllers\Helpers\ItemsGridHelper; use SP\Modules\Web\Controllers\Traits\ItemTrait; use SP\Modules\Web\Controllers\Traits\JsonTrait; @@ -132,7 +131,7 @@ class AuthTokenController extends ControllerBase implements CrudControllerInterf $this->view->assign('authToken', $authToken); $this->view->assign('users', SelectItemAdapter::factory(UserService::getItemsBasic())->getItemsFromModelSelected([$authToken->getUserId()])); - $this->view->assign('actions', SelectItemAdapter::factory(ApiTokensUtil::getTokenActions())->getItemsFromArraySelected([$authToken->getActionId()])); + $this->view->assign('actions', SelectItemAdapter::factory(AuthTokenService::getTokenActions())->getItemsFromArraySelected([$authToken->getActionId()])); $this->view->assign('sk', $this->session->generateSecurityKey()); $this->view->assign('nextAction', Acl::getActionRoute(ActionsInterface::ACCESS_MANAGE)); @@ -323,10 +322,9 @@ class AuthTokenController extends ControllerBase implements CrudControllerInterf $this->setViewData($id); $this->eventDispatcher->notifyEvent('show.authToken', - new Event($this, - EventMessage::factory() - ->addDescription(__u('Autorización visualizada')) - ->addDetail(__u('Autorización'), $id)) + new Event($this, EventMessage::factory() + ->addDescription(__u('Autorización visualizada')) + ->addDetail(__u('Autorización'), $id)) ); } catch (\Exception $e) { processException($e); diff --git a/composer.lock b/composer.lock index f00378aa..f42002c8 100644 --- a/composer.lock +++ b/composer.lock @@ -425,33 +425,33 @@ }, { "name": "doctrine/inflector", - "version": "v1.1.0", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" + "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", - "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/e11d84c6e018beedd929cff5220969a3c6d1d462", + "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "4.*" + "phpunit/phpunit": "^6.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Inflector\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" } }, "notification-url": "https://packagist.org/downloads/", @@ -488,7 +488,7 @@ "singularize", "string" ], - "time": "2015-11-06T14:35:42+00:00" + "time": "2017-07-22T12:18:28+00:00" }, { "name": "doctrine/lexer", @@ -1235,18 +1235,19 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "664836e89c7ecad3dbaabc1572ea752c0d532d80" + "reference": "1b2f1f59ff8fc933e4d61ee45214ff3228e20c75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/664836e89c7ecad3dbaabc1572ea752c0d532d80", - "reference": "664836e89c7ecad3dbaabc1572ea752c0d532d80", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/1b2f1f59ff8fc933e4d61ee45214ff3228e20c75", + "reference": "1b2f1f59ff8fc933e4d61ee45214ff3228e20c75", "shasum": "" }, "conflict": { "3f/pygmentize": "<1.2", "adodb/adodb-php": "<5.20.6", "amphp/artax": "<1.0.6|>=2,<2.0.6", + "amphp/http": "<1.0.1", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", "aws/aws-sdk-php": ">=3,<3.2.1", "bugsnag/bugsnag-laravel": ">=2,<2.0.2", @@ -1333,7 +1334,7 @@ "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", "thelia/backoffice-default-template": ">=2.1,<2.1.2", - "thelia/thelia": ">=2.1,<2.1.2|>=2.1.0-beta1,<2.1.3", + "thelia/thelia": ">=2.1.0-beta1,<2.1.3|>=2.1,<2.1.2", "titon/framework": ">=0,<9.9.99", "twig/twig": "<1.20", "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.22|>=8,<8.7.5", @@ -1383,7 +1384,7 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "time": "2018-03-07T15:45:44+00:00" + "time": "2018-03-15T17:53:05+00:00" } ], "packages-dev": [ diff --git a/lib/SP/Services/Api/ApiService.php b/lib/SP/Services/Api/ApiService.php index ffbd9a23..2410364c 100644 --- a/lib/SP/Services/Api/ApiService.php +++ b/lib/SP/Services/Api/ApiService.php @@ -124,8 +124,8 @@ class ApiService extends Service * Devolver el valor de un parámetro * * @param string $param - * @param bool $required Si es requerido - * @param mixed $default Valor por defecto + * @param bool $required Si es requerido + * @param mixed $default Valor por defecto * @return int|string * @throws ServiceException */ @@ -210,7 +210,7 @@ class ApiService extends Service ], 'category/search' => [ 'help' => [ - 'name' => __('Nombre de categoría a buscar'), + 'text' => __('Texto a buscar'), 'count' => __('Número de resultados a mostrar') ] ], @@ -227,7 +227,7 @@ class ApiService extends Service ], 'client/search' => [ 'help' => [ - 'name' => __('Nombre de cliente a buscar'), + 'text' => __('Texto a buscar'), 'count' => __('Número de resultados a mostrar') ] ], @@ -242,6 +242,22 @@ class ApiService extends Service 'help' => [ 'id' => __('Id de cliente') ] + ], + 'tag/search' => [ + 'help' => [ + 'text' => __('Texto a buscar'), + 'count' => __('Número de resultados a mostrar') + ] + ], + 'tag/create' => [ + 'help' => [ + 'name' => __('Nombre de la etiqueta') + ] + ], + 'tag/delete' => [ + 'help' => [ + 'id' => __('Id de etiqueta') + ] ] ]; } @@ -313,8 +329,8 @@ class ApiService extends Service /** * @param string $param - * @param bool $required - * @param null $default + * @param bool $required + * @param null $default * @return int|string * @throws ServiceException */ @@ -325,8 +341,8 @@ class ApiService extends Service /** * @param string $param - * @param bool $required - * @param null $default + * @param bool $required + * @param null $default * @return int|string * @throws ServiceException */ @@ -337,8 +353,8 @@ class ApiService extends Service /** * @param string $param - * @param bool $required - * @param null $default + * @param bool $required + * @param null $default * @return int|string * @throws ServiceException */ @@ -349,8 +365,8 @@ class ApiService extends Service /** * @param string $param - * @param bool $required - * @param null $default + * @param bool $required + * @param null $default * @return int|string * @throws ServiceException */ diff --git a/lib/SP/Services/AuthToken/AuthTokenService.php b/lib/SP/Services/AuthToken/AuthTokenService.php index f4ca00c6..067df7df 100644 --- a/lib/SP/Services/AuthToken/AuthTokenService.php +++ b/lib/SP/Services/AuthToken/AuthTokenService.php @@ -24,6 +24,7 @@ namespace SP\Services\AuthToken; +use SP\Core\Acl\Acl; use SP\Core\Acl\ActionsInterface; use SP\Core\Crypt\Hash; use SP\Core\Crypt\Session as CryptSession; @@ -237,4 +238,38 @@ class AuthTokenService extends Service { $this->authTokenRepository = $this->dic->get(AuthTokenRepository::class); } + + /** + * Devuelver un array de acciones posibles para los tokens + * + * @return array + */ + public static function getTokenActions() + { + $actions = [ + ActionsInterface::ACCOUNT_SEARCH => Acl::getActionInfo(ActionsInterface::ACCOUNT_SEARCH), + ActionsInterface::ACCOUNT_VIEW => Acl::getActionInfo(ActionsInterface::ACCOUNT_VIEW), + ActionsInterface::ACCOUNT_VIEW_PASS => Acl::getActionInfo(ActionsInterface::ACCOUNT_VIEW_PASS), + ActionsInterface::ACCOUNT_DELETE => Acl::getActionInfo(ActionsInterface::ACCOUNT_DELETE), + ActionsInterface::ACCOUNT_CREATE => Acl::getActionInfo(ActionsInterface::ACCOUNT_CREATE), + ActionsInterface::BACKUP_CONFIG => Acl::getActionInfo(ActionsInterface::BACKUP_CONFIG), + ActionsInterface::CATEGORY_SEARCH => Acl::getActionInfo(ActionsInterface::CATEGORY_SEARCH), + ActionsInterface::CATEGORY_VIEW => Acl::getActionInfo(ActionsInterface::CATEGORY_VIEW), + ActionsInterface::CATEGORY_CREATE => Acl::getActionInfo(ActionsInterface::CATEGORY_CREATE), + ActionsInterface::CATEGORY_EDIT => Acl::getActionInfo(ActionsInterface::CATEGORY_EDIT), + ActionsInterface::CATEGORY_DELETE => Acl::getActionInfo(ActionsInterface::CATEGORY_DELETE), + ActionsInterface::CLIENT_SEARCH => Acl::getActionInfo(ActionsInterface::CLIENT_SEARCH), + ActionsInterface::CLIENT_VIEW => Acl::getActionInfo(ActionsInterface::CLIENT_VIEW), + ActionsInterface::CLIENT_CREATE => Acl::getActionInfo(ActionsInterface::CLIENT_CREATE), + ActionsInterface::CLIENT_EDIT => Acl::getActionInfo(ActionsInterface::CLIENT_EDIT), + ActionsInterface::CLIENT_DELETE => Acl::getActionInfo(ActionsInterface::CLIENT_DELETE), + ActionsInterface::TAG_SEARCH => Acl::getActionInfo(ActionsInterface::TAG_SEARCH), + ActionsInterface::TAG_VIEW => Acl::getActionInfo(ActionsInterface::TAG_VIEW), + ActionsInterface::TAG_CREATE => Acl::getActionInfo(ActionsInterface::TAG_CREATE), + ActionsInterface::TAG_EDIT => Acl::getActionInfo(ActionsInterface::TAG_EDIT), + ActionsInterface::TAG_DELETE => Acl::getActionInfo(ActionsInterface::TAG_DELETE), + ]; + + return $actions; + } } \ No newline at end of file