From 6dc6fdacf4ed359d6bcd6f9912a188b47f0217f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 27 Aug 2024 12:39:37 +0200 Subject: [PATCH] list ocm shares in sharedByMe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/ocm-listing-fixes.md | 4 +++- services/graph/pkg/service/v0/sharedbyme.go | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/changelog/unreleased/ocm-listing-fixes.md b/changelog/unreleased/ocm-listing-fixes.md index ffff55eab..6e308789a 100644 --- a/changelog/unreleased/ocm-listing-fixes.md +++ b/changelog/unreleased/ocm-listing-fixes.md @@ -1,5 +1,7 @@ -Bugfix: add missing properties to when listing ocm shares +Bugfix: fix listing ocm shares The libre graph API now returns an etag, the role and the creation time for ocm shares. +It also includes ocm shares in the sharedByMe endpoint. +https://github.com/owncloud/ocis/pull/9925 https://github.com/owncloud/ocis/pull/9920 diff --git a/services/graph/pkg/service/v0/sharedbyme.go b/services/graph/pkg/service/v0/sharedbyme.go index 286476dc1..22a9be302 100644 --- a/services/graph/pkg/service/v0/sharedbyme.go +++ b/services/graph/pkg/service/v0/sharedbyme.go @@ -25,6 +25,14 @@ func (g Graph) GetSharedByMe(w http.ResponseWriter, r *http.Request) { return } + if g.config.IncludeOCMSharees { + driveItems, err = g.listOCMShares(ctx, nil, driveItems) + if err != nil { + errorcode.RenderError(w, r, err) + return + } + } + driveItems, err = g.listPublicShares(ctx, nil, driveItems) if err != nil { errorcode.RenderError(w, r, err)