Skip to content

[full-ci] fix(sharing-ng): align sharedWithMe driveItem IDs with PROPFIND response - #8467

Merged
butonic merged 2 commits into
owncloud:masterfrom
rhafer:issue/8080
Feb 21, 2024
Merged

butonic merged 2 commits into
owncloud:masterfrom
rhafer:issue/8080

Conversation

@rhafer

@rhafer rhafer commented Feb 15, 2024 •

Copy link
Copy Markdown
Contributor

Should fix #8420

/cc @individual-it

@update-docs

update-docs Bot commented Feb 15, 2024

Copy link
Copy Markdown

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@rhafer
rhafer force-pushed the issue/8080 branch 3 times, most recently from 663e20b to 2cb31ef Compare February 20, 2024 13:58
@rhafer rhafer changed the title [full-ci] Bump reva for #8080 [full-ci] fix(sharing-ng): align sharedWithMe driveItem IDs with PROPFIND response Feb 20, 2024
@rhafer

rhafer commented Feb 20, 2024

Copy link
Copy Markdown
Contributor Author

This is now the response of the sharedWithMe endpoint:

{
  "value": [
    {
      "@UI.Hidden": false,
      "@client.synchronize": true,
      "createdBy": {
        "user": {
          "displayName": "Admin",
          "id": "354c5a1d-bf13-4d6f-b844-7580c58576fb"
        }
      },
      "eTag": "\"3eabdd6cdd6786be98ab99dfda0bbdd3\"",
      "folder": {},
      "id": "a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!134c39fb-1978-42ee-bf27-c1aea656cedf:354c5a1d-bf13-4d6f-b844-7580c58576fb:55bb6cce-c22a-4af2-9704-6fa62f975a9b",
      "lastModifiedDateTime": "2024-02-20T12:15:54.845128841Z",
      "name": "New folder",
      "parentReference": {
        "driveId": "a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668",
        "driveType": "virtual",
        "id": "a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!a0ca6a90-a365-4782-871e-d44447bbc668"
      },
      "remoteItem": {
        "createdBy": {
          "user": {
            "displayName": "Admin",
            "id": "354c5a1d-bf13-4d6f-b844-7580c58576fb"
          }
        },
        "eTag": "\"3eabdd6cdd6786be98ab99dfda0bbdd3\"",
        "folder": {},
        "id": "134c39fb-1978-42ee-bf27-c1aea656cedf$354c5a1d-bf13-4d6f-b844-7580c58576fb!dd66c396-319c-4f40-b06e-591be6d128af",
        "lastModifiedDateTime": "2024-02-20T12:15:54.845128841Z",
        "name": "New folder",
        "parentReference": {
          "driveId": "134c39fb-1978-42ee-bf27-c1aea656cedf$354c5a1d-bf13-4d6f-b844-7580c58576fb!354c5a1d-bf13-4d6f-b844-7580c58576fb",
          "driveType": "personal"
        },
        "permissions": [
          {
            "grantedToV2": {
              "user": {
                "displayName": "Marie Skłodowska Curie",
                "id": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"
              }
            },
            "id": "134c39fb-1978-42ee-bf27-c1aea656cedf:354c5a1d-bf13-4d6f-b844-7580c58576fb:55bb6cce-c22a-4af2-9704-6fa62f975a9b",
            "invitation": {
              "invitedBy": {
                "user": {
                  "displayName": "Admin",
                  "id": "354c5a1d-bf13-4d6f-b844-7580c58576fb"
                }
              }
            },
            "roles": [
              "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5"
            ]
          },
          {
            "grantedToV2": {
              "group": {
                "displayName": "users",
                "id": "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"
              }
            },
            "id": "134c39fb-1978-42ee-bf27-c1aea656cedf:354c5a1d-bf13-4d6f-b844-7580c58576fb:67000a51-b984-413b-b109-0cd6a2055f71",
            "invitation": {
              "invitedBy": {
                "user": {
                  "displayName": "Admin",
                  "id": "354c5a1d-bf13-4d6f-b844-7580c58576fb"
                }
              }
            },
            "roles": [
              "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5"
            ]
          }
        ],
        "size": 32318359
      },
      "size": 32318359
    }
  ]
}

and this this response for a PROPFIND on the sharejail root:

<?xml version="1.0"?>
<d:multistatus xmlns:s="http://sabredav.org/ns" xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
  <d:response>
    <d:href>/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668/</d:href>
    <d:propstat>
      <d:prop>
        <oc:id>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!a0ca6a90-a365-4782-871e-d44447bbc668</oc:id>
        <oc:fileid>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!a0ca6a90-a365-4782-871e-d44447bbc668</oc:fileid>
        <oc:spaceid>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668</oc:spaceid>
        <oc:shareid/>
        <d:getetag>"3eabdd6cdd6786be98ab99dfda0bbdd3"</d:getetag>
        <oc:permissions/>
        <d:resourcetype>
          <d:collection/>
        </d:resourcetype>
        <oc:size>0</oc:size>
        <d:getlastmodified>Tue, 20 Feb 2024 12:15:54 GMT</d:getlastmodified>
        <oc:favorite>0</oc:favorite>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <oc:file-parent/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668/New%20folder/</d:href>
    <d:propstat>
      <d:prop>
        <oc:id>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!134c39fb-1978-42ee-bf27-c1aea656cedf:354c5a1d-bf13-4d6f-b844-7580c58576fb:55bb6cce-c22a-4af2-9704-6fa62f975a9b</oc:id>
        <oc:fileid>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!134c39fb-1978-42ee-bf27-c1aea656cedf:354c5a1d-bf13-4d6f-b844-7580c58576fb:55bb6cce-c22a-4af2-9704-6fa62f975a9b</oc:fileid>
        <oc:spaceid>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668</oc:spaceid>
        <oc:file-parent>134c39fb-1978-42ee-bf27-c1aea656cedf$354c5a1d-bf13-4d6f-b844-7580c58576fb!354c5a1d-bf13-4d6f-b844-7580c58576fb</oc:file-parent>
        <oc:shareid/>
        <oc:name>New folder</oc:name>
        <d:displayname>New folder</d:displayname>
        <d:getetag>"3eabdd6cdd6786be98ab99dfda0bbdd3"</d:getetag>
        <oc:permissions>SR</oc:permissions>
        <d:resourcetype>
          <d:collection/>
        </d:resourcetype>
        <oc:size>32318359</oc:size>
        <d:getlastmodified>Tue, 20 Feb 2024 12:15:54 GMT</d:getlastmodified>
        <oc:tags/>
        <oc:favorite>0</oc:favorite>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <oc:audio/>
        <oc:location/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

As you can see the id of the driveItem in the sharedWithMe response now matches the oc:fileid/oc:id of the prop item in the PROPFIND response.

@amrita-shrestha

amrita-shrestha commented Feb 21, 2024 •

Copy link
Copy Markdown
Contributor

I can't see any value in <oc:shareid> in response to a PROPFIND on the sharejail root.
Is this actual behaviour @rhafer

@rhafer

rhafer commented Feb 21, 2024

Copy link
Copy Markdown
Contributor Author

I can't see any value in <oc:shareid> in response to a PROPFIND on the sharejail root.
Is this actual behaviour @rhafer

This is not a regression. It was the same way before. Though probably worth a separate bug report.

The IDs of the driveItems returned by the 'sharedWithMe' endpoint
should match the ids returned by the webdav PROPFIND response on
the share jail.

Fixes: owncloud#8420
@rhafer
rhafer marked this pull request as ready for review February 21, 2024 11:38
@sonarqubecloud

Copy link
Copy Markdown

@amrita-shrestha

Copy link
Copy Markdown
Contributor

👍🏼 works with ocis-php-sdk

@butonic
butonic merged commit b6fea0f into owncloud:master Feb 21, 2024
ownclouders pushed a commit that referenced this pull request Feb 21, 2024
…FIND response (#8467)

* Bump reva

Fixes: #8080

* fix(sharing-ng): align sharedWithMe driveItem IDs

The IDs of the driveItems returned by the 'sharedWithMe' endpoint
should match the ids returned by the webdav PROPFIND response on
the share jail.

Fixes: #8420
@micbar micbar mentioned this pull request Feb 26, 2024
67 of 71 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DriveItem ID from listSharedWithMe doesn't match with shared resource id

3 participants