API host.update responds 200 even though it cannot add a template

XMLWordPrintable

    • Type: Problem report
    • Resolution: Incomplete
    • Priority: Trivial
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Steps to reproduce:

      1. Create 2 template: First, Second
      2. Add First template to "First template group" , Second template to "Second template group"
      3. Create User group "Testy" with only Template permissions: "First  template group"
      4. Create user Testowy belonging to the Testy group
      5. Using a user Testowy try to add 2 template via api to host:
      {'jsonrpc': '2.0', 'method': 'host.update', 'params': {'hostid': '{HOST_ID}', 'templates': [{'templateid': '{FIRST_TEMPLATE_ID}'}, {'templateid': '{SECOND_TEMPLATE_ID}'}]}, 'auth': 'abcdefghijklmnoprstqxyz', 'id': XXXX}

      Result:
      API response 200 code
      Both templates: First (with permission) and Second (without permission) is not added to host.

      Expected:
      A response other than 200 and no template addition is expected.

            Assignee:
            Kamil Florowski (Inactive)
            Reporter:
            GChmurka
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: