From ba6f06130eff9a79b8ddaa9d72c4fe24c88366d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Mon, 15 Apr 2024 16:37:17 +0200 Subject: [PATCH] use share id to identify ocm shares MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/fix-ocm-share-id.md | 5 +++++ internal/grpc/services/ocmshareprovider/ocmshareprovider.go | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/fix-ocm-share-id.md diff --git a/changelog/unreleased/fix-ocm-share-id.md b/changelog/unreleased/fix-ocm-share-id.md new file mode 100644 index 00000000000..3b1ad26a107 --- /dev/null +++ b/changelog/unreleased/fix-ocm-share-id.md @@ -0,0 +1,5 @@ +Bugfix: fix ocm-share-id + +We now use the share id to correctly identify ocm shares. + +https://github.com/cs3org/reva/pull/4630 \ No newline at end of file diff --git a/internal/grpc/services/ocmshareprovider/ocmshareprovider.go b/internal/grpc/services/ocmshareprovider/ocmshareprovider.go index 5c5824540c1..b42ce7fa4fb 100644 --- a/internal/grpc/services/ocmshareprovider/ocmshareprovider.go +++ b/internal/grpc/services/ocmshareprovider/ocmshareprovider.go @@ -171,9 +171,9 @@ func getResourceType(info *providerpb.ResourceInfo) string { return "unknown" } -func (s *service) webdavURL(ctx context.Context, share *ocm.Share) string { +func (s *service) webdavURL(_ context.Context, share *ocm.Share) string { // the url is in the form of https://cernbox.cern.ch/remote.php/dav/ocm/token - p, _ := url.JoinPath(s.conf.WebDAVEndpoint, "/dav/ocm", share.Token) + p, _ := url.JoinPath(s.conf.WebDAVEndpoint, "/dav/ocm", share.GetId().GetOpaqueId()) return p }