From f0d8b7b2fae8eb5a7cb5c5b4cd14d9c91f3b7efa 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 9372020b355..132f7c90d7a 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{},