Skip to content

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

Closed

Description

@amrita-shrestha

Describe the bug

RemoteItemId doesn't match with shared resource id of share drive propfind

Steps to reproduce

  1. einstein user share folder sharedWithAdmin
  2. admin user sends listShareWithMe api request
    curl -XGET -uadmin:admin https://localhost:9200/graph/v1beta1/me/drive/sharedWithMe
{
    "value": [
        {
            "@UI.Hidden": false,
            "@client.synchronize": false,
            "createdBy": {
                "user": {
                    "displayName": "Albert Einstein",
                    "id": "4c510ada-c86b-4815-8820-42cdf82c3d51"
                }
            },
            "eTag": "\"e1814f22a63e241cfc523befa7a82e07\"",
            "folder": {},
            "id": "a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!fd0ef83b-87d2-436d-8951-24dc7f57dc29:4c510ada-c86b-4815-8820-42cdf82c3d51:119ffb99-c559-4bad-acc0-b406d6c9a396",
            "lastModifiedDateTime": "2024-02-09T14:25:40.436634666+05:45",
            "name": "sharedWithAdmin",
            "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": "Albert Einstein",
                        "id": "4c510ada-c86b-4815-8820-42cdf82c3d51"
                    }
                },
                "eTag": "\"e1814f22a63e241cfc523befa7a82e07\"",
                "folder": {},
                "id": "fd0ef83b-87d2-436d-8951-24dc7f57dc29$4c510ada-c86b-4815-8820-42cdf82c3d51!119ffb99-c559-4bad-acc0-b406d6c9a396",
                "lastModifiedDateTime": "2024-02-09T14:25:40.436634666+05:45",
                "name": "sharedWithAdmin",
                "parentReference": {
                    "driveId": "fd0ef83b-87d2-436d-8951-24dc7f57dc29$4c510ada-c86b-4815-8820-42cdf82c3d51!4c510ada-c86b-4815-8820-42cdf82c3d51",
                    "driveType": "personal"
                },
                "permissions": [
                    {
                        "grantedToV2": {
                            "user": {
                                "displayName": "Admin",
                                "id": "7fe42e72-47b7-479e-b053-640db050593e"
                            }
                        },
                        "id": "fd0ef83b-87d2-436d-8951-24dc7f57dc29:4c510ada-c86b-4815-8820-42cdf82c3d51:51191bbe-9b8f-4d70-91ae-7abfa3c9d59b",
                        "invitation": {
                            "invitedBy": {
                                "user": {
                                    "displayName": "Albert Einstein",
                                    "id": "4c510ada-c86b-4815-8820-42cdf82c3d51"
                                }
                            }
                        },
                        "roles": [
                            "fb6c3e19-e378-47e5-b277-9732f9de6e21"
                        ]
                    }
                ]
            }
        }
    ]
}
  1. admin user send propfind request on share drive
    curl -XPROPFIND -uadmin:admin https://localhost:9200/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668
    Response
<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/sharedWithAdmin/</d:href>
        <d:propstat>
            <d:prop>
                <oc:id>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!fd0ef83b-87d2-436d-8951-24dc7f57dc29:4c510ada-c86b-4815-8820-42cdf82c3d51:51191bbe-9b8f-4d70-91ae-7abfa3c9d59b</oc:id>
                <oc:fileid>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!fd0ef83b-87d2-436d-8951-24dc7f57dc29:4c510ada-c86b-4815-8820-42cdf82c3d51:51191bbe-9b8f-4d70-91ae-7abfa3c9d59b</oc:fileid>
                <oc:spaceid>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668</oc:spaceid>
                <oc:file-parent>fd0ef83b-87d2-436d-8951-24dc7f57dc29$4c510ada-c86b-4815-8820-42cdf82c3d51!4c510ada-c86b-4815-8820-42cdf82c3d51</oc:file-parent>
                <oc:shareid></oc:shareid>
                <oc:name>sharedWithAdmin</oc:name>
                <d:displayname>sharedWithAdmin</d:displayname>
                <d:getetag>"e1814f22a63e241cfc523befa7a82e07"</d:getetag>
                <oc:permissions>SRDNVCK</oc:permissions>
                <d:resourcetype>
                    <d:collection/>
                </d:resourcetype>
                <oc:size>0</oc:size>
                <d:getlastmodified>Fri, 09 Feb 2024 08:40:40 GMT</d:getlastmodified>
                <oc:tags></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:audio>
                <oc:location></oc:location>
            </d:prop>
            <d:status>HTTP/1.1 404 Not Found</d:status>
        </d:propstat>
    </d:response>
</d:multistatus>

Expected behavior

RemoteItemId should match with shared item id from propfind

Actual behavior

shared item id during propfind is different than listsharedWithme request
<oc:id>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!fd0ef83b-87d2-436d-8951-24dc7f57dc29:4c510ada-c86b-4815-8820-42cdf82c3d51:51191bbe-9b8f-4d70-91ae-7abfa3c9d59b</oc:id>
doesn't matches with

"remoteItem": {
               ......
                "id": "fd0ef83b-87d2-436d-8951-24dc7f57dc29$4c510ada-c86b-4815-8820-42cdf82c3d51!119ffb99-c559-4bad-acc0-b406d6c9a396",
}
...

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

Details

OCIS_XXX=5.1.0-prealpha+5f57740976
OCIS_YYY=somevalue
PROXY_XXX=somevalue

Need Clarification

  • DriveItemId , PermissionId and RemoteItemId on listShareWithMe response?
  • Is DriveItemId, share-id or not?
  • Is permissionId, shared-resource-id or share-id?
  • Is RemoteItemId, shared-resource-id or resource-id ?

Activity

  1. self-assigned this
    on Feb 13, 2024
  2. moved this from Qualification to Prio 3 or less in Infinite Scale Team Boardon Feb 13, 2024
  3. rhafer commented on Feb 14, 2024

    @rhafer
    Contributor
    • Is DriveItemId, share-id or not?

    It's not the share-id. The driveItemId does currently have the resourceId of the shared resource encoded into it. But clients should never rely on that.

    • Is permissionId, shared-resource-id or share-id?

    The permissionId is the shareid

    • Is RemoteItemId, shared-resource-id or resource-id ?

    The id of the remoteItem is the resourceId of the shared resource.

  4. rhafer commented on Feb 15, 2024

    @rhafer
    Contributor

    Once we have the fix for #8080 (cs3org/reva#4517) merged and bumped in to ocis. We can adjust the sharedWithMe endpoint to return the same ids on the driveItems that are also returned by the PROPFIND on the sharejail root. 🤞

  5. added 3 commits that reference this issue on Feb 20, 2024
    aac6202
    663e20b
    2cb31ef
  6. changed the title [-]RemoteItemId from listSharedWithMe doesn't match with shared resource id[/-] [+]DriveItemId from listSharedWithMe doesn't match with shared resource id[/+] on Feb 20, 2024
  7. changed the title [-]DriveItemId from listSharedWithMe doesn't match with shared resource id[/-] [+]DriveItem ID from listSharedWithMe doesn't match with shared resource id[/+] on Feb 20, 2024
  8. added 3 commits that reference this issue on Feb 21, 2024
    49362dc
    a944046
    a28532e
  9. added a commit that references this issue on Feb 21, 2024
    b6fea0f
  10. added a commit that references this issue on Feb 21, 2024
    f29767e
  11. added this to the Release 5.0.0 milestone on Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions