Skip to content

Commit

Permalink
fix resource id in public shares
Browse files Browse the repository at this point in the history
  • Loading branch information
micbar committed Apr 27, 2022
1 parent 618964e commit 12d0b2a
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down

0 comments on commit 12d0b2a

Please sign in to comment.