From 53b778d9a4684d774804df9c76aa138e20da6b5a Mon Sep 17 00:00:00 2001 From: jkoberg Date: Tue, 6 Sep 2022 10:16:43 +0200 Subject: [PATCH] add rootinfo to storage space Signed-off-by: jkoberg --- changelog/unreleased/add-rootinfo-to-storagespace.md | 6 ++++++ pkg/storage/utils/decomposedfs/spaces.go | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 changelog/unreleased/add-rootinfo-to-storagespace.md diff --git a/changelog/unreleased/add-rootinfo-to-storagespace.md b/changelog/unreleased/add-rootinfo-to-storagespace.md new file mode 100644 index 0000000000..7659f54634 --- /dev/null +++ b/changelog/unreleased/add-rootinfo-to-storagespace.md @@ -0,0 +1,6 @@ +Bugfix: Adds the rootinfo to storage spaces + +The sympton of the bug were search results not containing +permissions + +https://github.com/cs3org/reva/pull/3194 diff --git a/pkg/storage/utils/decomposedfs/spaces.go b/pkg/storage/utils/decomposedfs/spaces.go index c42a1cee35..5314d5b25e 100644 --- a/pkg/storage/utils/decomposedfs/spaces.go +++ b/pkg/storage/utils/decomposedfs/spaces.go @@ -902,6 +902,10 @@ func (fs *Decomposedfs) storageSpaceFromNode(ctx context.Context, n *node.Node, if ok { space.Opaque = utils.AppendPlainToOpaque(space.Opaque, "spaceAlias", spaceAlias) } + + // add rootinfo + ps := n.SpaceRoot.PermissionSet(ctx) + space.RootInfo, _ = n.SpaceRoot.AsResourceInfo(ctx, &ps, nil, nil, false) return space, nil }