Uploaded image for project: 'mod-inventory'
  1. mod-inventory
  2. MODINV-203

Insufficient permissions to provide record representation for PUT method of /inventory/items/{itemId}

    XMLWordPrintable

Details

    • Prokopovych

    Description

      The PUT method of the /inventory/items/{itemId} endpoint has the following set of module permissions assigned in the module descriptor:

                "modulePermissions": [
                  "inventory-storage.items.item.put",
                  "users.item.get"
                ]
      

      Unfortunately, this is insufficient to successfully update an item using this endpoint, because mod-inventory then needs to GET the updated item to display it back to the client. That requires further module permissions, presumably all those assigned to the GET method:

                "modulePermissions": [
                  "inventory-storage.items.item.get",
                  "inventory-storage.material-types.item.get",
                  "inventory-storage.material-types.collection.get",
                  "inventory-storage.loan-types.item.get",
                  "inventory-storage.loan-types.collection.get",
                  "inventory-storage.locations.item.get",
                  "inventory-storage.locations.collection.get",
                  "inventory-storage.holdings.collection.get",
                  "inventory-storage.holdings.item.get",
                  "inventory-storage.instances.collection.get",
                  "inventory-storage.instances.item.get"
                ]
      

      Unless this is corrected in the module descriptor, assigning the permissionSet inventory.items.item.put is actually not enough to allow a user to use the PUT method on this endpoint.

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                wayne Wayne Schneider
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases