/
mikopbx
/
ModuleUsersUI
Обзор
Документация
Войти
/
mikopbx
/
ModuleUsersUI
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
master
Lib/ACL/ModuleAmoCrmACL.php
72 строки
2 KB
Nikolay Beketov
Add ACL templates for each existing module.
22 мар 2024, 04:43
22 мар 2024, 04:43
5e3a768
Код
Авторство
О чём код?
<?php /* * MikoPBX - free phone system for small business * Copyright © 2017-2023 Alexey Portnov and Nikolay Beketov * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with this program. * If not, see <https://www.gnu.org/licenses/>. */ namespace Modules\ModuleUsersUI\Lib\ACL; use Modules\ModuleAmoCrm\App\Controllers\ModuleAmoCrmController; use Modules\ModuleUsersUI\Lib\EndpointConstants as RestEndpoints; class ModuleAmoCrmACL implements ACLInterface { const API_MODULE_AMO_CRM = '/pbxcore/api/modules/module-amo-crm'; /** * Prepares list of linked controllers to other controllers to hide it from UI * and allow or disallow with the main one. * * @return array[] */ public static function getLinkedControllerActions(): array { return [ ModuleAmoCrmController::class=>[ RestEndpoints::ACTION_INDEX => [ ModuleAmoCrmController::class=>[ 'getTablesDescription', 'getNewRecords', 'check', 'save', 'modify', 'saveEntitySettings', 'delete', 'saveTableData', 'changePriority' ], self::API_MODULE_AMO_CRM=>'*' ], ] ]; } /** * Returns list of controllers that are always allowed * @return array */ public static function getAlwaysAllowed(): array{ return []; } /** * The list of controllers that are always disallowed * only for superusers * @return array */ public static function getAlwaysDenied(): array { return []; } }