Skip to content

Commit

Permalink
fix shares provider filter
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed Jan 11, 2022
1 parent 3d66054 commit 63d5c0d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-shares-provider-filter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: fix shares provider filter

The shares storage provider now correctly filters space types

https://github.com/cs3org/reva/pull/2433
Original file line number Diff line number Diff line change
Expand Up @@ -317,14 +317,15 @@ func (s *service) ListStorageSpaces(ctx context.Context, req *provider.ListStora
case provider.ListStorageSpacesRequest_Filter_TYPE_SPACE_TYPE:
spaceType := f.GetSpaceType()
// do we need to fetch the shares?
if spaceType == "mountpoint" || spaceType == "grant" {
spaceTypes[spaceType] = exists
fetchShares = true
}
if spaceType == "+mountpoint" || spaceType == "+grant" {
appendTypes = append(appendTypes, strings.TrimPrefix(spaceType, "+"))
fetchShares = true
continue
}
if spaceType == "mountpoint" || spaceType == "grant" {
fetchShares = true
}
spaceTypes[spaceType] = exists
case provider.ListStorageSpacesRequest_Filter_TYPE_ID:
spaceid, shareid, err := utils.SplitStorageSpaceID(f.GetId().OpaqueId)
if err != nil {
Expand Down

0 comments on commit 63d5c0d

Please sign in to comment.