Source
'service_write_access' => 'in '.implode(',', [CRoleHelper::SERVICES_ACCESS_NONE, CRoleHelper::SERVICES_ACCESS_ALL, CRoleHelper::SERVICES_ACCESS_LIST]),
<?php declare(strict_types = 0);
/*
** Zabbix
** Copyright (C) 2001-2024 Zabbix SIA
**
** 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 2 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, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/**
* Class containing operations with userrole edit form.
*/
class CControllerUserroleEdit extends CControllerUserroleEditGeneral {
private $role;
protected function init(): void {
$this->disableSIDValidation();
}
protected function checkInput(): bool {
$fields = [
'roleid' => 'db users.roleid',
'name' => 'db role.name',
'type' => 'in '.implode(',', [USER_TYPE_ZABBIX_USER, USER_TYPE_ZABBIX_ADMIN, USER_TYPE_SUPER_ADMIN]),
'ui_monitoring_dashboard' => 'in 0,1',
'ui_monitoring_problems' => 'in 0,1',
'ui_monitoring_hosts' => 'in 0,1',
'ui_monitoring_latest_data' => 'in 0,1',
'ui_monitoring_maps' => 'in 0,1',
'ui_monitoring_discovery' => 'in 0,1',
'ui_services_services' => 'in 0,1',
'ui_services_actions' => 'in 0,1',
'ui_services_sla' => 'in 0,1',
'ui_services_sla_report' => 'in 0,1',
'ui_inventory_overview' => 'in 0,1',
'ui_inventory_hosts' => 'in 0,1',
'ui_reports_system_info' => 'in 0,1',
'ui_reports_scheduled_reports' => 'in 0,1',
'ui_reports_availability_report' => 'in 0,1',
'ui_reports_top_triggers' => 'in 0,1',
'ui_reports_audit' => 'in 0,1',
'ui_reports_action_log' => 'in 0,1',
'ui_reports_notifications' => 'in 0,1',
'ui_configuration_host_groups' => 'in 0,1',
'ui_configuration_templates' => 'in 0,1',
'ui_configuration_hosts' => 'in 0,1',
'ui_configuration_maintenance' => 'in 0,1',
'ui_configuration_actions' => 'in 0,1',
'ui_configuration_event_correlation' => 'in 0,1',
'ui_configuration_discovery' => 'in 0,1',