Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-20714

[HotFix] /nodes/{nodeId}/content REST API fails for content created by a deleted user

    Details

      Description

      HF needs to include MNT-20714MNT-20965 please.

      Description:

      A user creates a document in the repository.  Subsequently that user is deleted.  When a second user calls the REST API to 'update the content' of the document, the call returns a success but the document is not updated.
       
      Steps to reproduce:
       
      1/. Install OOTB ACS v5.2.4.3
      2/. Create 2 users ('leon' and 'josie')
      3/. Logon on as 'josie' and create a site (apichecksite)
       - add a folder
       - upload a document (restapicheck2) into the folder
      4/. Invite user 'leon' to be a member of the site 'apichecksite' as a collaborator

      Using the REST API, check that both Josie and Leon can update the content of 'restapicheck2' - the document uploaded in step #3.
      alfresco/api/default/public/alfresco/versions/1/nodes/{nodeid}/content?majorVersion=false

      Note: I am using Postman for testing and attached the updated file to the REST API using 'body -> binary'

      5/. Delete user 'josie'
      6/. As user 'leon', try to 'update the content' of the document uploaded in step #3.
      alfresco/api/default/public/alfresco/versions/1/nodes/{nodeid}/content?majorVersion=false
       
      Observed Behaviour
       
      The REST API call returns successfully to indicate the document has been updated, but when viewed thru SHARE the document has not been updated.

      {
          "entry": {
              "isFile": true,
              "createdByUser": {
                  "id": "josie",
                  "displayName": "josie"
              },
              "modifiedAt": "2019-06-14T11:36:50.528+0000",
              "nodeType": "cm:content",
              "content": {
                  "mimeType": "text/plain",
                  "mimeTypeName": "Plain Text",
                  "sizeInBytes": 19,
                  "encoding": "ISO-8859-1"
              },
              "parentId": "60b386df-338a-457e-bbd5-0c119937a221",
              "aspectNames": [
                  "rn:renditioned",
                  "cm:versionable",
                  "cm:titled",
                  "cm:auditable",
                  "cm:author",
                  "cm:thumbnailModification"
              ],
              "createdAt": "2019-06-14T11:28:42.229+0000",
              "isFolder": false,
              "modifiedByUser": {
                  "id": "leon",
                  "displayName": "Leon Lavery"
              },
              "name": "restapicheck2.txt",
              "id": "7dd2fbc4-12f2-4b01-b9cd-cce5dac96373",
              "properties": {
                  "cm:versionLabel": "1.4",
                  "cm:lastThumbnailModification": [
                      "pdf:1560511838121",
                      "doclib:1560511838139"
                  ],
                  "cm:versionType": "MINOR"

       
      Expected Behaviour
       
      After a user has been deleted, it should still be possible to 'update the content' of a document created by the deleted user.
       
      NOTE: The same problem was seen with the /nodes/{nodeid}/lock and /nodes/{nodeid}/unlock REST API's which were fixed in JIRA MNT-20481 and released as ACS v5.2.4.3

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  closedbugs Closed Bugs (Inactive)
                  Reporter:
                  pbateman Paul Bateman
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Structure Helper Panel