Export of templates with linked templates fails for users with granular permissions

XMLWordPrintable

    • Type: Problem report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 7.0.18
    • Component/s: Frontend (F)
    • Environment:
      Zabbix Server 7.0.18 (Docker container)
      Zabbix Frontend 7.0.18 (Docker container)
      PostgreSQL 17.6 (TimescaleDB 2.19.3)
    • Support backlog

      After upgrading to 7.0.18 from 6.4.22, exporting a template that has linked templates (directly or transitively) fails only for users with granular, group-scoped permissions. The same export succeeds for templates without links, accounts with global permissions or accounts without Host subgroups. This breaks routine team-scoped backups and CI/CD flows for templates.{}

      Steps to reproduce:

      1. Create (or use) a User group with access restricted to specific Template groups and Host groups, including subgroups.
      2. As a user in that User group, attempt to export:
        • a template that links to another template, or
        • a template that is linked by another template (transitively)

      Result:

      Observe the failure:

      • Web UI: HTTP 500 error page.
      • API: Exception: Zabbix API error: {'code': -32603, 'message': 'Internal error.', 'data': 'CConfigurationExportBuilder::formatGroups(): Argument #1 ($groups) must be of type array, null given, called in /usr/share/zabbix/include/classes/export/CConfigurationExportBuilder.php on line 341'}

      See attached log file from Zabbix frontend

      Expected:
      Successful export of the template to a file

            Assignee:
            Zabbix Development Team
            Reporter:
            Andrii Ivanov
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: