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

Details

    • Problem report
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 6.0.7, 6.2.2rc1, 6.4.0alpha1 (master)
    • None
    • API (A)
    • Team B

    Description

      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}"

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: