Details

    • Type: Story
    • Status: Closed (View Workflow)
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: ACS 5.2
    • Component/s: REST API
    • Labels:
      None

      Description

      As a developer using the REST API I want to optionally retrieve the operations I'm allowed to perform on a node in the repository.

      Acceptance Criteria

      • The /nodes/{nodeId}?include=allowableOperations URL accepts a GET request and returns a 200 status code with the allowableOperations property in the response (see example below)
      • The /nodes/{nodeId}/children?include=allowableOperations URL accepts a GET request and returns a 200 status code with the allowableOperations property in the response (see example below)
      • The allowableOperations array returns one or more of the following values for the current authentication:
        • create
        • update
        • delete
      • The "create" operation maps to the repository "AddChildren" permission
      • The "update" operation maps to the repository "Write" permission
      • The "delete" operation maps to the repository "Delete" permission
      • If the user does not have any of the mapped permissions then "allowableOperations" is not returned (rather than an empty array)
      • Note: "read" is implied by the fact that the current user has access to return the current node (rather than a 404)

      Example Response

      Content-Type: application/json
      
      {
         "allowableOperations": [
            "create", "update", "delete"
         ],
         "aspectNames": [
            "cm:auditable", "cm:titled"
         ],
         "createdAt": "2015-11-19T11:08:42.004+0000", 
         "createdByUser": {
            "displayName": "Joe Bloggs",
            "id": "jbloggs"
         }, 
         "id": "99532d84-d540-410c-b52a-c2131cf33589", 
         "isFolder": true, 
         "modifiedAt": "2015-11-19T11:08:42.004+0000", 
         "modifiedByUser": {
            "displayName": "Joe Bloggs",
            "id": "jbloggs"
         }, 
         "name": "Test Folder", 
         "nodeType": "cm:folder", 
         "parentId": "9afcc003-3911-4f75-a974-a163cc43c986",
         "properties": {
            "cm:title": "Title"
         }
      }
      

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  gcornwell Gavin Cornwell [X] (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Structure Helper Panel