See www.zabbix.com for the official Zabbix site.

Docs/specs/ZBXNEXT-2581

From Zabbix.org
Jump to: navigation, search

Return permissions with API usergroup.get method

ZBXNEXT-2581

Status: v1.1

Owner: Ivo

Summary

Currently only usergroup.create and usergroup.update supports setting permissions. Allow users to retrieve permissions with API usergroup.get method.

Specification

Front-end changes

No frontend changes.

API changes

usergroup.get

Method will support new parameter "selectRights" - query, which will return an array containing "permission" and "id" in "rights" property.

Example of usage

 Request:
 {
     "usrgrpid": "7",
     "output": [
         "name"
     ],
     "selectRights": [
         "permission",
         "id"
     ]
 }
 Output:
 [
     {
         "usrgrpid": "7",
         "name": "Zabbix administrators",
         "rights": [
             {
                 "permission": "3",
                 "id": "2"
             }
         ]
     }
 ]

Superadmins can select any user group and thus get all rights. Normal admins can select only their own group and must get only rights that are READ and READ-WRITE. API should not return IDs for denied host groups.

Translation strings

  • No translation string changes.

Database changes

No database changes.

Documentation

ChangeLog

  • v1.0 Initial version
  • v1.1 Added changes to API