Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-21429

All UI elements can be disabled via API role.update request

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 6.0.7, 6.2.2rc1, 6.4.0alpha1
    • API (A)
    • Team C
    • Technical backlog

      Steps to reproduce:

      • Create user role via API so only one element will be enabled e.g.
      {
          "jsonrpc": "2.0",
          "method": "role.create",
          "params": {
              "name": "{name}",
              "type": "1",
              "rules": {
                  "ui": [
                          {
                              "name": "monitoring.dashboard",
                              "status": "0"
                          },
                          {
                              "name": "monitoring.problems",
                              "status": "1"
                          },
                          {
                              "name": "monitoring.hosts",
                              "status": "0"
                          },
                          {
                              "name": "monitoring.latest_data",
                              "status": "0"
                          },
                          {
                              "name": "monitoring.maps",
                              "status": "0"
                          },
                          {
                              "name": "services.services",
                              "status": "0"
                          },
                          {
                              "name": "services.sla_report",
                              "status": "0"
                          },
                          {
                              "name": "inventory.overview",
                              "status": "0"
                          },
                          {
                              "name": "inventory.hosts",
                              "status": "0"
                          },
                          {
                              "name": "reports.availability_report",
                              "status": "0"
                          },
                          {
                              "name": "reports.top_triggers",
                              "status": "0"
                          }
                          ]
              }
          },
          "auth": "{{token}}",
          "id": 1
      }
      
      • Update user role via API so all UI elements will be disabled e.g.
            "jsonrpc": "2.0",
            "method": "role.update",
            "params": {
                "roleid": "{role_id}",
                "rules": {
                    "ui": [
                        
                            
                            {
                                "name": "monitoring.problems",
                                "status": "0"
                            }
                    ]
                
                }
            },
            "auth": "{{token}}",
            "id": 1
        }
        
      • Check user role via FE

      Result: All UI elements for the role are disabled.

      Expected: Validation error should appear "At least one UI element must be enabled for user role {role_name}"

            zabbix.dev Zabbix Development Team
            kseve Kirils Seve
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: