diff --git a/changelog/unreleased/public-ids.md b/changelog/unreleased/public-ids.md new file mode 100644 index 0000000000..24b3afd041 --- /dev/null +++ b/changelog/unreleased/public-ids.md @@ -0,0 +1,5 @@ +Bugfix: Return the correct file IDs on public link resources + +Resources in public shares should return the real resourceids from the storage of the owner. + +https://github.com/cs3org/reva/pull/2788 diff --git a/internal/grpc/services/publicstorageprovider/publicstorageprovider.go b/internal/grpc/services/publicstorageprovider/publicstorageprovider.go index 4ff440642f..8dfb62c65b 100644 --- a/internal/grpc/services/publicstorageprovider/publicstorageprovider.go +++ b/internal/grpc/services/publicstorageprovider/publicstorageprovider.go @@ -740,17 +740,10 @@ func (s *service) augmentStatResponse(ctx context.Context, res *provider.StatRes } res.Info.Path = path.Join("/", sharePath) - s.setPublicStorageID(res.Info, tkn) filterPermissions(res.Info.PermissionSet, share.GetPermissions().Permissions) } } -// setPublicStorageID encodes the actual spaceid and nodeid as an opaqueid in the publicstorageprovider space -func (s *service) setPublicStorageID(info *provider.ResourceInfo, shareToken string) { - info.Id.StorageId = utils.PublicStorageProviderID - info.Id.OpaqueId = shareToken -} - func addShare(i *provider.ResourceInfo, ls *link.PublicShare) error { if i.Opaque == nil { i.Opaque = &typesv1beta1.Opaque{}