Skip to content

Commit

Permalink
fix(graph): Don't return OCM shares in the drives list
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rhafer committed Dec 4, 2024
1 parent e08899d commit b74de4c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions changelog/unreleased/me_drives_ocm_shares.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Fix graph drives response for federated shares

Federated shares where erroneously showing up in the /me/drives response
on the graph API.

https://github.com/owncloud/ocis/pull/1xxxx
https://github.com/owncloud/ocis/issues/10689
4 changes: 4 additions & 0 deletions services/graph/pkg/service/v0/drives.go
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,10 @@ func (g Graph) formatDrives(ctx context.Context, baseURL *url.URL, storageSpaces
for i := 0; i < numWorkers; i++ {
errg.Go(func() error {
for storageSpace := range work {
if storageSpace.GetRoot().GetStorageId() == utils.OCMStorageProviderID {
// skip OCM shares they are no supposed to show up in the drives list
continue
}
res, err := g.cs3StorageSpaceToDrive(ctx, baseURL, storageSpace, apiVersion)
if err != nil {
return err
Expand Down

0 comments on commit b74de4c

Please sign in to comment.