Skip to content

Commit

Permalink
[wip]: bugfix(sharing): use correct resourceid unmounting
Browse files Browse the repository at this point in the history
  • Loading branch information
rhafer committed Feb 12, 2024
1 parent 66d24b8 commit 98f0e06
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions services/graph/pkg/service/v0/api_drives_drive_item.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"google.golang.org/protobuf/types/known/fieldmaskpb"

"github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool"
"github.com/cs3org/reva/v2/pkg/share/manager/jsoncs3/shareid"
"github.com/cs3org/reva/v2/pkg/storagespace"

"github.com/owncloud/ocis/v2/ocis-pkg/log"
Expand Down Expand Up @@ -56,6 +57,14 @@ func (s DrivesDriveItemService) UnmountShare(ctx context.Context, resourceID sto
return err
}

// HACK: This is a hack we should not rely on a specific format of the item id, but current the real
// resource id of the shared resource is buried in the opaque id of the share's resourceid
// Also this relies on specific behaviour of the jsoncs3 share manager
storageId, spaceId, opaqueId := shareid.Decode(resourceID.GetOpaqueId())
resourceID.StorageId = storageId
resourceID.SpaceId = spaceId
resourceID.OpaqueId = opaqueId

receivedSharesResponse, err := gatewayClient.ListReceivedShares(ctx, &collaboration.ListReceivedSharesRequest{
Filters: []*collaboration.Filter{
{
Expand Down

0 comments on commit 98f0e06

Please sign in to comment.