Source
zbx_db_result_t result = zbx_db_select("select saml_idp_entityid,saml_sso_url,saml_slo_url,saml_username_attribute,"
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** 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 Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
/*
* 6.4 development database patches
*/
static int DBpatch_6030000(void)
{
zbx_db_result_t result;
zbx_db_row_t row;
zbx_db_insert_t db_insert;
int ret = SUCCEED;
if (0 == (DBget_program_type() & ZBX_PROGRAM_TYPE_SERVER))
return SUCCEED;
result = zbx_db_select("select roleid,type,name,value_int from role_rule where name in ("
"'ui.configuration.actions',"
"'ui.services.actions',"
"'ui.administration.general')");
zbx_db_insert_prepare(&db_insert, "role_rule", "role_ruleid", "roleid", "type", "name", "value_int",
(char *)NULL);
while (NULL != (row = zbx_db_fetch(result)))
{
zbx_uint64_t roleid;
int value_int, type;
ZBX_STR2UINT64(roleid, row[0]);
type = atoi(row[1]);
value_int = atoi(row[3]);
if (0 == strcmp(row[2], "ui.configuration.actions"))
{
zbx_db_insert_add_values(&db_insert, __UINT64_C(0), roleid, type,
"ui.configuration.autoregistration_actions", value_int);
zbx_db_insert_add_values(&db_insert, __UINT64_C(0), roleid, type,
"ui.configuration.discovery_actions", value_int);
zbx_db_insert_add_values(&db_insert, __UINT64_C(0), roleid, type,
"ui.configuration.internal_actions", value_int);