From c252c1ef394fb20e246bf267fabe29ffba5ac52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Mon, 21 Mar 2022 09:17:16 +0000 Subject: [PATCH] ocdav: replace public mountpoint fileid with grant fileid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- internal/http/services/owncloud/ocdav/propfind/propfind.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/http/services/owncloud/ocdav/propfind/propfind.go b/internal/http/services/owncloud/ocdav/propfind/propfind.go index 9372020b35..132f7c90d7 100644 --- a/internal/http/services/owncloud/ocdav/propfind/propfind.go +++ b/internal/http/services/owncloud/ocdav/propfind/propfind.go @@ -721,6 +721,11 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p sublog.Debug().Interface("role", role).Str("dav-permissions", wdp).Msg("converted PermissionSet") } + // replace fileid of /public/{token} mountpoint with grant fileid + if ls != nil && md.Id != nil && md.Id.StorageId == utils.PublicStorageProviderID && md.Id.OpaqueId == ls.Token { + md.Id = ls.ResourceId + } + propstatOK := PropstatXML{ Status: "HTTP/1.1 200 OK", Prop: []*props.PropertyXML{},