Skip to content

Commit

Permalink
Merge pull request #4710 from micbar/fix-user-index
Browse files Browse the repository at this point in the history
fix: space listing when user has no personal space
  • Loading branch information
micbar authored Jun 4, 2024
2 parents ea1516b + 61a5421 commit 408bb64
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-user-group-index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Tolerate missing user space index

We fixed a bug where the spaces for a user were not listed if the user had no space index by user. This happens when a user has the role "User Light" and has been invited to a project space via a group.

https://github.com/cs3org/reva/pull/4710
3 changes: 2 additions & 1 deletion pkg/storage/utils/decomposedfs/spaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ func (fs *Decomposedfs) ListStorageSpaces(ctx context.Context, filter []*provide

if requestedUserID != nil {
allMatches, err = fs.userSpaceIndex.Load(requestedUserID.GetOpaqueId())
if err != nil {
// do not return an error if the user has no spaces
if err != nil && !os.IsNotExist(err) {
return nil, errors.Wrap(err, "error reading user index")
}

Expand Down

0 comments on commit 408bb64

Please sign in to comment.