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

[OCM] federation shares missing name and root.remoteItem values in the drives list #10689

Closed
Tracked by #9735
prashant-gurung899 opened this issue Nov 29, 2024 · 8 comments · Fixed by #10730
Closed
Tracked by #9735
Assignees
Labels

Comments

@prashant-gurung899
Copy link
Contributor

prashant-gurung899 commented Nov 29, 2024

Describe the bug

name and root.remoteItem are missing in driveType mountpoint while listing drives.

Steps to reproduce

  1. And "Alice" has generated invitation
  2. And using server "REMOTE"
  3. And "Brian" has accepted invitation
  4. And using server "LOCAL"
  5. And user "Alice" has created a folder "FOLDER" in space "Personal"
  6. When "Alice" shares folder to "Brian"
  7. as Brian, get all the drives
  curl 'https://localhost:10200/graph/v1.0/me/drives' \
  -uBrian:1234 -vk | jq 

Expected behavior

Expected to have name and root.remoteItem for driveType mountpoint.

Actual behavior

{
  "value": [
    {
      ...
    },
    {
      ...
    },
    {
      "driveType": "mountpoint",
      "id": "89f37a33-858b-45fa-8890-a1f2b27d90e1$febb0e7e-56e4-449a-b16f-5ace56dc14ce",
      "name": "",
      "owner": {
        "user": {
          "displayName": "",
          "id": "2c215cf8-6ccb-4eeb-92f8-61864b5bab40"
        }
      },
      "root": {
        "id": "89f37a33-858b-45fa-8890-a1f2b27d90e1$febb0e7e-56e4-449a-b16f-5ace56dc14ce",
        "webDavUrl": "https://localhost:10200/dav/spaces/89f37a33-858b-45fa-8890-a1f2b27d90e1$febb0e7e-56e4-449a-b16f-5ace56dc14ce"
      },
      "webUrl": "https://localhost:10200/f/89f37a33-858b-45fa-8890-a1f2b27d90e1$febb0e7e-56e4-449a-b16f-5ace56dc14ce"
    }
  ]
}
@saw-jan saw-jan changed the title OCM. name and root.remoteItem missing in mountpoint driveType [OCM] federation shares missing name and root.remoteItem values in the drives list Nov 29, 2024
@saw-jan
Copy link
Member

saw-jan commented Nov 29, 2024

@rhafer is this fixable?

@rhafer
Copy link
Contributor

rhafer commented Dec 2, 2024

@rhafer is this fixable?

Good question. I need to check.

@rhafer rhafer self-assigned this Dec 2, 2024
@rhafer rhafer moved this from Qualification to In progress in Infinite Scale Team Board Dec 2, 2024
@rhafer
Copy link
Contributor

rhafer commented Dec 2, 2024

Something is borked here. I don't think ocm shares should be reflected in the /me/drives/ output at all. 🤔

@rhafer
Copy link
Contributor

rhafer commented Dec 2, 2024

Hm, I just noticed that our sharedWithMe endpoints return the virtual share jail as the parentReference for ocm shares. This is wrong as well. The share jail has nothing to do with ocm shares, it's just for "normal" shares.

rhafer added a commit to rhafer/reva that referenced this issue Dec 3, 2024
Currently there are no mountpoints for federated shares. We just return
an empty list on the ListStorageSpaces request.

Related: owncloud/ocis#10689
rhafer added a commit to rhafer/reva that referenced this issue Dec 3, 2024
Currently there are no mountpoints for federated shares. We just return
an empty list on the ListStorageSpaces request.

Related: owncloud/ocis#10689
@rhafer
Copy link
Contributor

rhafer commented Dec 3, 2024

@rhafer is this fixable?

@saw-jan I guess it is possible set set a name. I am not so sure about the root.remoteItem. What exactly do you need it for?

@saw-jan
Copy link
Member

saw-jan commented Dec 4, 2024

we use name and remoteItem to check for the share and sharer for normal shares. and reported it because federated share doesn't have them.

@rhafer
Copy link
Contributor

rhafer commented Dec 4, 2024

we use name and remoteItem to check for the share and sharer for normal shares. and reported it because federated share doesn't have them.

Ok. I guess the /me/drives endpoint is probably the wrong endpoint to use for federated shares. "normal" shares are represented there via mountpoint type drives (unless they have sync disabled I think). But federated shares don't have a concept of the sync enabled/disabled (accepted/ unaccepted) state. The fact that they are currently showing up in /me/drives is a bug (at least that's what we figured after some discussion yesterday).

I think /v1beta1/me/drive/sharedWithMe should have all the information you need (for "normal" and federated shares).

@saw-jan
Copy link
Member

saw-jan commented Dec 4, 2024

Okey, that means with the fix /me/drives should not list the ocm shares

rhafer added a commit to rhafer/ocis that referenced this issue Dec 4, 2024
OCM shares don't have mountpoints currently. So they're no supposed
to show up in the drives list on the graph service.

Fixes: owncloud#10689
rhafer added a commit to rhafer/ocis that referenced this issue Dec 4, 2024
OCM shares don't have mountpoints currently. So they're no supposed
to show up in the drives list on the graph service.

Fixes: owncloud#10689
rhafer added a commit to rhafer/ocis that referenced this issue Dec 4, 2024
OCM shares don't have mountpoints currently. So they're no supposed
to show up in the drives list on the graph service.

Fixes: owncloud#10689
@github-project-automation github-project-automation bot moved this from In progress to Done in Infinite Scale Team Board Dec 9, 2024
This was referenced Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants