/
mikopbx
/
ModuleUsersUI
Обзор
Документация
Войти
/
mikopbx
/
ModuleUsersUI
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
master
Lib/ACL/ModulePT1CCoreACL.php
65 строк
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-2024 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\ModulePT1CCore\App\Controllers\ModulePT1CCoreController; use Modules\ModuleUsersUI\Lib\EndpointConstants as RestEndpoints; class ModulePT1CCoreACL implements ACLInterface { const API_MODULE_PT1C_CORE = '/pbxcore/api/modules/module-p-t1-c-core'; /** * 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 [ ModulePT1CCoreController::class => [ RestEndpoints::ACTION_INDEX => [ ModulePT1CCoreController::class => [ RestEndpoints::ACTION_SAVE ], self::API_MODULE_PT1C_CORE=>'*' ], ] ]; } /** * 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 []; } }