Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sharing-ng] the parentReference field of /v1beta1/me/drive/sharedWithMe endpoint returns only driveId and not the driveType #8029

Closed
SwikritiT opened this issue Dec 20, 2023 · 3 comments
Labels

Comments

@SwikritiT
Copy link
Contributor

SwikritiT commented Dec 20, 2023

Describe the bug

According to https://owncloud.dev/libre-graph-api/#/me.drive/ListSharedWithMe
The response should look something like this

{
  "value": [
    {
      "id": "78363031-03ef-4eda-84a2-243a691a13cd",
      "createdDateTime": "2020-02-19T14:23:25.52Z",
      "cTag": "adDpDMTI2NDRBMTRCMEE3NzUwITEzNzkuNjM3NjYyNzQ5NjU1MDMwMDAw",
      "eTag": "aQzEyNjQ0QTE0QjBBNzc1MCExMzc5LjQ",
      "lastModifiedDateTime": "2021-09-03T14:09:25.503Z",
      "name": "March Proposal.docx",
      "parentReference": {
        "driveId": "1991210caf",
        "driveType": "personal"
      },
      "remoteItem": {
        "id": "02d7a7df-a6f7-44cc-848a-3c98f7dd5046",
        "name": "March Proposal.docx",
        "size": 19121,
        "shared": {
          "sharedDateTime": "2020-02-19T14:23:25.52Z",
          "owner": {
            "user": {
              "displayName": "Albert Einstein",
              "id": "44feab10d55e9871"
            }
          }
        }
      }
    }
  ]
}

But right now parentReference only contains driveId key-value

  "parentReference": {
        "driveId": "1991210caf"
      },

Also, what is the driveId? currently, it's not the same as the id of the personal space as I expected it to be. it seems like it is a part of the id of the shared file or folder. for instance

{
"driveAlias": "mountpoint/new-folder",
      "driveType": "mountpoint",
      "id": "a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!<this-part-is-currently-returned-as-driveId-for-parent-refrence>",
      "name": "New folder",
      "owner": {
        "user": {
          "displayName": "",
          "id": "1b956cf8-a230-4ca9-8cea-05a27d36396b"
        }
      },
....
}

Steps to reproduce

  1. Share a file or folder to user einstein
  2. As user Einstein list the resources shared to them
curl -X 'GET' \
  'https://localhost:9200/graph/v1beta1/me/drive/sharedWithMe' \
  -H 'accept: application/json' -ueinstein:relativity -vk | jq

Expected behavior

The parentReference should contain both driveType and driveId as listed in swagger

Actual behavior

The parentReference only contains driveId.

Setup

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

PROXY_ENABLE_BASIC_AUTH=true 
OCIS_INSECURE=true 
OCIS_ASYNC_UPLOADS=true 
IDM_CREATE_DEMO_USERS=true 
OCIS_LOG_LEVEL=debug 
MICRO_REGISTRY=natsjs 
MICRO_REGISTRY_ADDRESS=127.0.0.1:9233

Additional context

Add any other context about the problem here.

@SwikritiT SwikritiT changed the title the parentReference field of /v1beta1/me/drive/sharedWithMe endpoint returns only driveId and not the driveType [sharing-ng] the parentReference field of /v1beta1/me/drive/sharedWithMe endpoint returns only driveId and not the driveType Dec 20, 2023
@individual-it
Copy link
Member

See also #6993

@rhafer
Copy link
Contributor

rhafer commented Dec 21, 2023

Should be fixed when gets merged #8016

@rhafer
Copy link
Contributor

rhafer commented Jan 17, 2024

#8016 was merged, this should be solved now.

@rhafer rhafer closed this as completed Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants