Skip to content

Commit

Permalink
fix shares provider filter (#2433)
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic committed Feb 14, 2022
1 parent 5c6d949 commit 9e2e91c
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 9e2e91c

Please sign in to comment.