From 49ab88e9809cc46c896a9e52360e6e6d608718cc Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Mon, 21 Jul 2025 15:51:17 +0200 Subject: [PATCH 1/8] Add signed-url handling to thumbnail service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Duffeck Signed-off-by: Christian Richter --- services/graph/pkg/service/v0/sharedbyme.go | 67 ++++++++++++++++++- .../thumbnails/pkg/service/http/v0/service.go | 41 +++++++++++- 2 files changed, 104 insertions(+), 4 deletions(-) diff --git a/services/graph/pkg/service/v0/sharedbyme.go b/services/graph/pkg/service/v0/sharedbyme.go index 01b682db1e..fc3933edfb 100644 --- a/services/graph/pkg/service/v0/sharedbyme.go +++ b/services/graph/pkg/service/v0/sharedbyme.go @@ -1,24 +1,50 @@ package svc import ( - "net/http" - + "fmt" + "github.com/CiscoM31/godata" rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" "github.com/go-chi/render" libregraph "github.com/opencloud-eu/libre-graph-api-go" + "github.com/opencloud-eu/opencloud/services/graph/pkg/odata" + "github.com/opencloud-eu/opencloud/services/thumbnails/pkg/thumbnail" + "github.com/opencloud-eu/reva/v2/pkg/signedurl" + "net/http" + "slices" + "time" "github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode" ) type driveItemsByResourceID map[string]libregraph.DriveItem +// parseShareByMeRequest parses the odata request and returns the parsed request and a boolean indicating if the request should expand thumbnails. +func parseShareByMeRequest(r *http.Request) (*godata.GoDataRequest, bool, error) { + odataReq, err := godata.ParseRequest(r.Context(), sanitizePath(r.URL.Path, APIVersion_1), r.URL.Query()) + if err != nil { + return nil, false, errorcode.New(errorcode.InvalidRequest, err.Error()) + } + exp, err := odata.GetExpandValues(odataReq.Query) + if err != nil { + return nil, false, errorcode.New(errorcode.InvalidRequest, err.Error()) + } + expandThumbnails := slices.Contains(exp, "thumbnails") + return odataReq, expandThumbnails, nil +} + // GetSharedByMe implements the Service interface (/me/drives/sharedByMe endpoint) func (g Graph) GetSharedByMe(w http.ResponseWriter, r *http.Request) { g.logger.Debug().Msg("Calling GetRootDriveChildren") ctx := r.Context() + _, expandThumbnails, err := parseShareByMeRequest(r) + if err != nil { + errorcode.RenderError(w, r, err) + return + } + fmt.Println("expandThumbnails:", expandThumbnails) + driveItems := make(driveItemsByResourceID) - var err error driveItems, err = g.listUserShares(ctx, nil, driveItems) if err != nil { errorcode.RenderError(w, r, err) @@ -39,6 +65,41 @@ func (g Graph) GetSharedByMe(w http.ResponseWriter, r *http.Request) { return } + if expandThumbnails { + for k, item := range driveItems { + mt := item.GetFile().MimeType + if mt == nil { + continue + } + + signer, err := signedurl.NewJWTSignedURL(signedurl.WithSecret("abcde")) + if err != nil { + panic("failed to create signer") + } + + _, match := thumbnail.SupportedMimeTypes[*mt] + if match { + signedURL, err := signer.Sign("https://localhost:9200/", item.GetId(), 30*time.Minute) + if err != nil { + g.logger.Error().Err(err).Msg("Failed to get thumbnail URL") + continue + } + t := libregraph.NewThumbnail() + t.SetUrl(signedURL) + item.SetThumbnails([]libregraph.ThumbnailSet{ + { + Small: t, + Medium: t, + Large: t, + }, + }) + + driveItems[k] = item // assign modified item back to the map + } + } + + } + res := make([]libregraph.DriveItem, 0, len(driveItems)) for _, v := range driveItems { res = append(res, v) diff --git a/services/thumbnails/pkg/service/http/v0/service.go b/services/thumbnails/pkg/service/http/v0/service.go index 04c8f8627d..31be4a47ab 100644 --- a/services/thumbnails/pkg/service/http/v0/service.go +++ b/services/thumbnails/pkg/service/http/v0/service.go @@ -3,7 +3,9 @@ package svc import ( "context" "fmt" + "github.com/opencloud-eu/reva/v2/pkg/signedurl" "net/http" + "net/url" "strconv" "github.com/go-chi/chi/v5" @@ -65,6 +67,7 @@ func NewService(opts ...Option) Service { m.Route(options.Config.HTTP.Root, func(r chi.Router) { r.Use(svc.TransferTokenValidator) + r.Use(svc.SignedUrlValidator) r.Get("/data", svc.GetThumbnail) }) @@ -114,11 +117,47 @@ func (s Thumbnails) GetThumbnail(w http.ResponseWriter, r *http.Request) { } } +func (s Thumbnails) SignedUrlValidator(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + u, err := url.Parse(r.URL.String()) + if err != nil { + w.WriteHeader(http.StatusBadRequest) + return + } + + signer, err := signedurl.NewJWTSignedURL(signedurl.WithSecret("abcde")) + if err != nil { + panic("failed to create signer") + } + + sig := u.Query().Get("oc-jwt-sig") + if sig == "" { + next.ServeHTTP(w, r) + } + + _, err = signer.Verify(u.String()) + if err == nil { + // the signature is valid + next.ServeHTTP(w, r) + } else { + w.WriteHeader(http.StatusUnauthorized) + } + + // TODO: make sure that one of the validator validated + // TODO: log errors + }) +} + // TransferTokenValidator validates a transfer token func (s Thumbnails) TransferTokenValidator(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - logger := s.logger.SubloggerWithRequestID(r.Context()) tokenString := r.Header.Get("Transfer-Token") + if tokenString == "" { + next.ServeHTTP(w, r) + return + } + + logger := s.logger.SubloggerWithRequestID(r.Context()) token, err := jwt.ParseWithClaims(tokenString, &tjwt.ThumbnailClaims{}, func(token *jwt.Token) (interface{}, error) { if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok { return nil, fmt.Errorf("unexpected signing method: %v", token.Header["alg"]) From a6cdbc710dbc4402818d93620b1b3fdccf7698e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Tue, 22 Jul 2025 10:42:22 +0200 Subject: [PATCH 2/8] Fix thumbnail URLs for sharedbyme --- services/graph/pkg/service/v0/sharedbyme.go | 61 ++++++--------------- 1 file changed, 16 insertions(+), 45 deletions(-) diff --git a/services/graph/pkg/service/v0/sharedbyme.go b/services/graph/pkg/service/v0/sharedbyme.go index fc3933edfb..e2b40da15b 100644 --- a/services/graph/pkg/service/v0/sharedbyme.go +++ b/services/graph/pkg/service/v0/sharedbyme.go @@ -2,50 +2,25 @@ package svc import ( "fmt" - "github.com/CiscoM31/godata" + "net/http" + "strings" + rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" "github.com/go-chi/render" libregraph "github.com/opencloud-eu/libre-graph-api-go" - "github.com/opencloud-eu/opencloud/services/graph/pkg/odata" "github.com/opencloud-eu/opencloud/services/thumbnails/pkg/thumbnail" - "github.com/opencloud-eu/reva/v2/pkg/signedurl" - "net/http" - "slices" - "time" "github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode" ) type driveItemsByResourceID map[string]libregraph.DriveItem -// parseShareByMeRequest parses the odata request and returns the parsed request and a boolean indicating if the request should expand thumbnails. -func parseShareByMeRequest(r *http.Request) (*godata.GoDataRequest, bool, error) { - odataReq, err := godata.ParseRequest(r.Context(), sanitizePath(r.URL.Path, APIVersion_1), r.URL.Query()) - if err != nil { - return nil, false, errorcode.New(errorcode.InvalidRequest, err.Error()) - } - exp, err := odata.GetExpandValues(odataReq.Query) - if err != nil { - return nil, false, errorcode.New(errorcode.InvalidRequest, err.Error()) - } - expandThumbnails := slices.Contains(exp, "thumbnails") - return odataReq, expandThumbnails, nil -} - // GetSharedByMe implements the Service interface (/me/drives/sharedByMe endpoint) func (g Graph) GetSharedByMe(w http.ResponseWriter, r *http.Request) { g.logger.Debug().Msg("Calling GetRootDriveChildren") ctx := r.Context() - _, expandThumbnails, err := parseShareByMeRequest(r) - if err != nil { - errorcode.RenderError(w, r, err) - return - } - fmt.Println("expandThumbnails:", expandThumbnails) - - driveItems := make(driveItemsByResourceID) - driveItems, err = g.listUserShares(ctx, nil, driveItems) + driveItems, err := g.listUserShares(ctx, nil, make(driveItemsByResourceID)) if err != nil { errorcode.RenderError(w, r, err) return @@ -65,6 +40,8 @@ func (g Graph) GetSharedByMe(w http.ResponseWriter, r *http.Request) { return } + expand := r.URL.Query().Get("$expand") + expandThumbnails := strings.Contains(expand, "thumbnails") if expandThumbnails { for k, item := range driveItems { mt := item.GetFile().MimeType @@ -72,32 +49,26 @@ func (g Graph) GetSharedByMe(w http.ResponseWriter, r *http.Request) { continue } - signer, err := signedurl.NewJWTSignedURL(signedurl.WithSecret("abcde")) - if err != nil { - panic("failed to create signer") - } - _, match := thumbnail.SupportedMimeTypes[*mt] if match { - signedURL, err := signer.Sign("https://localhost:9200/", item.GetId(), 30*time.Minute) - if err != nil { - g.logger.Error().Err(err).Msg("Failed to get thumbnail URL") - continue - } - t := libregraph.NewThumbnail() - t.SetUrl(signedURL) + baseUrl := fmt.Sprintf("%s/dav/spaces/%s?scalingup=0&preview=1&processor=thumbnail", + g.config.Commons.OpenCloudURL, + item.GetId()) + smallUrl := baseUrl + "&x=36&y=36" + mediumUrl := baseUrl + "&x=48&y=48" + largeUrl := baseUrl + "&x=96&y=96" + item.SetThumbnails([]libregraph.ThumbnailSet{ { - Small: t, - Medium: t, - Large: t, + Small: &libregraph.Thumbnail{Url: &smallUrl}, + Medium: &libregraph.Thumbnail{Url: &mediumUrl}, + Large: &libregraph.Thumbnail{Url: &largeUrl}, }, }) driveItems[k] = item // assign modified item back to the map } } - } res := make([]libregraph.DriveItem, 0, len(driveItems)) From 683b979bdde19df39ee5f24ea7f6db6bd53ffa3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Tue, 22 Jul 2025 10:42:46 +0200 Subject: [PATCH 3/8] Remove unused code --- .../thumbnails/pkg/service/http/v0/service.go | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/services/thumbnails/pkg/service/http/v0/service.go b/services/thumbnails/pkg/service/http/v0/service.go index 31be4a47ab..f7766a9136 100644 --- a/services/thumbnails/pkg/service/http/v0/service.go +++ b/services/thumbnails/pkg/service/http/v0/service.go @@ -3,9 +3,7 @@ package svc import ( "context" "fmt" - "github.com/opencloud-eu/reva/v2/pkg/signedurl" "net/http" - "net/url" "strconv" "github.com/go-chi/chi/v5" @@ -67,7 +65,6 @@ func NewService(opts ...Option) Service { m.Route(options.Config.HTTP.Root, func(r chi.Router) { r.Use(svc.TransferTokenValidator) - r.Use(svc.SignedUrlValidator) r.Get("/data", svc.GetThumbnail) }) @@ -117,37 +114,6 @@ func (s Thumbnails) GetThumbnail(w http.ResponseWriter, r *http.Request) { } } -func (s Thumbnails) SignedUrlValidator(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - u, err := url.Parse(r.URL.String()) - if err != nil { - w.WriteHeader(http.StatusBadRequest) - return - } - - signer, err := signedurl.NewJWTSignedURL(signedurl.WithSecret("abcde")) - if err != nil { - panic("failed to create signer") - } - - sig := u.Query().Get("oc-jwt-sig") - if sig == "" { - next.ServeHTTP(w, r) - } - - _, err = signer.Verify(u.String()) - if err == nil { - // the signature is valid - next.ServeHTTP(w, r) - } else { - w.WriteHeader(http.StatusUnauthorized) - } - - // TODO: make sure that one of the validator validated - // TODO: log errors - }) -} - // TransferTokenValidator validates a transfer token func (s Thumbnails) TransferTokenValidator(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { From 4c2b723ab0431e98fd96fe26105b21413437f4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Tue, 22 Jul 2025 10:43:00 +0200 Subject: [PATCH 4/8] Implement $expand=thumbnails for sharedwithme --- services/graph/pkg/service/v0/sharedwithme.go | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/services/graph/pkg/service/v0/sharedwithme.go b/services/graph/pkg/service/v0/sharedwithme.go index 796d46f914..f6e645e193 100644 --- a/services/graph/pkg/service/v0/sharedwithme.go +++ b/services/graph/pkg/service/v0/sharedwithme.go @@ -2,7 +2,9 @@ package svc import ( "context" + "fmt" "net/http" + "strings" collaboration "github.com/cs3org/go-cs3apis/cs3/sharing/collaboration/v1beta1" ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" @@ -10,12 +12,17 @@ import ( libregraph "github.com/opencloud-eu/libre-graph-api-go" "github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode" + "github.com/opencloud-eu/opencloud/services/thumbnails/pkg/thumbnail" ) // ListSharedWithMe lists the files shared with the current user. func (g Graph) ListSharedWithMe(w http.ResponseWriter, r *http.Request) { ctx := r.Context() - driveItems, err := g.listSharedWithMe(ctx) + + expand := r.URL.Query().Get("$expand") + expandThumbnails := strings.Contains(expand, "thumbnails") + + driveItems, err := g.listSharedWithMe(ctx, expandThumbnails) if err != nil { g.logger.Error().Err(err).Msg("listSharedWithMe failed") errorcode.RenderError(w, r, err) @@ -27,7 +34,7 @@ func (g Graph) ListSharedWithMe(w http.ResponseWriter, r *http.Request) { } // listSharedWithMe is a helper function that lists the drive items shared with the current user. -func (g Graph) listSharedWithMe(ctx context.Context) ([]libregraph.DriveItem, error) { +func (g Graph) listSharedWithMe(ctx context.Context, expandThumbnails bool) ([]libregraph.DriveItem, error) { gatewayClient, err := g.gatewaySelector.Next() if err != nil { g.logger.Error().Err(err).Msg("could not select next gateway client") @@ -59,5 +66,34 @@ func (g Graph) listSharedWithMe(ctx context.Context) ([]libregraph.DriveItem, er driveItems = append(driveItems, ocmDriveItems...) } + if expandThumbnails { + for k, item := range driveItems { + mt := item.GetFile().MimeType + if mt == nil { + continue + } + + _, match := thumbnail.SupportedMimeTypes[*mt] + if match { + baseUrl := fmt.Sprintf("%s/dav/spaces/%s?scalingup=0&preview=1&processor=thumbnail", + g.config.Commons.OpenCloudURL, + item.RemoteItem.GetId()) + smallUrl := baseUrl + "&x=36&y=36" + mediumUrl := baseUrl + "&x=48&y=48" + largeUrl := baseUrl + "&x=96&y=96" + + item.SetThumbnails([]libregraph.ThumbnailSet{ + { + Small: &libregraph.Thumbnail{Url: &smallUrl}, + Medium: &libregraph.Thumbnail{Url: &mediumUrl}, + Large: &libregraph.Thumbnail{Url: &largeUrl}, + }, + }) + + driveItems[k] = item // assign modified item back to the map + } + } + } + return driveItems, err } From 484f8bc66b0540cc805daa6e248db7074238610a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Tue, 22 Jul 2025 10:43:35 +0200 Subject: [PATCH 5/8] Make "remote.php" part of thumbnail URLs optional --- services/proxy/pkg/config/defaults/defaultconfig.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/proxy/pkg/config/defaults/defaultconfig.go b/services/proxy/pkg/config/defaults/defaultconfig.go index f1d42a3f8f..b9fdb29243 100644 --- a/services/proxy/pkg/config/defaults/defaultconfig.go +++ b/services/proxy/pkg/config/defaults/defaultconfig.go @@ -185,7 +185,7 @@ func DefaultPolicies() []config.Policy { }, { Type: config.QueryRoute, - Endpoint: "/remote.php/?preview=1", + Endpoint: "(/remote.php)?/?preview=1", Service: "eu.opencloud.web.webdav", }, // TODO the actual REPORT goes to /dav/files/{username}, which is user specific ... how would this work in a spaces world? From 55f1d9e4d240b92afcff898f17f64b00b17cc4d6 Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Thu, 17 Jul 2025 09:03:12 +0200 Subject: [PATCH 6/8] Add has-preview to search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Duffeck Signed-off-by: Christian Richter --- services/webdav/pkg/service/v0/search.go | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/services/webdav/pkg/service/v0/search.go b/services/webdav/pkg/service/v0/search.go index 2ae686a45f..7c4120997c 100644 --- a/services/webdav/pkg/service/v0/search.go +++ b/services/webdav/pkg/service/v0/search.go @@ -22,6 +22,7 @@ import ( searchmsg "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/messages/search/v0" searchsvc "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/services/search/v0" + "github.com/opencloud-eu/opencloud/services/thumbnails/pkg/thumbnail" "github.com/opencloud-eu/opencloud/services/webdav/pkg/constants" "github.com/opencloud-eu/opencloud/services/webdav/pkg/net" "github.com/opencloud-eu/opencloud/services/webdav/pkg/prop" @@ -195,9 +196,15 @@ func matchToPropResponse(ctx context.Context, publicURL string, match *searchmsg } propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:name", match.Entity.Name)) propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("d:getlastmodified", match.Entity.LastModifiedTime.AsTime().Format(constants.RFC1123))) - propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("d:getcontenttype", match.Entity.MimeType)) propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:permissions", match.Entity.Permissions)) propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:highlights", match.Entity.Highlights)) + propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("d:getcontenttype", match.Entity.MimeType)) + _, isSupportedMimeType := thumbnail.SupportedMimeTypes[match.Entity.MimeType] + if isSupportedMimeType { + propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:has-preview", "1")) + } else { + propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:has-preview", "0")) + } t := tags.New(match.Entity.Tags...) propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:tags", t.AsList())) @@ -234,6 +241,15 @@ func matchToPropResponse(ctx context.Context, publicURL string, match *searchmsg return &response, nil } +func hasPreview(md *provider.ResourceInfo, appendToOK func(p ...prop.PropertyXML)) { + _, match := thumbnail.SupportedMimeTypes[md.MimeType] + if match { + appendToOK(prop.Escaped("oc:has-preview", "1")) + } else { + appendToOK(prop.Escaped("oc:has-preview", "0")) + } +} + type report struct { SearchFiles *reportSearchFiles // FilterFiles TODO add this for tag based search From d3f73b13ff657efab347d056d341028a3dfc8c1b Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Thu, 24 Jul 2025 13:31:56 +0200 Subject: [PATCH 7/8] Revert optional remote.php path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Duffeck Signed-off-by: Christian Richter --- services/proxy/pkg/config/defaults/defaultconfig.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/proxy/pkg/config/defaults/defaultconfig.go b/services/proxy/pkg/config/defaults/defaultconfig.go index b9fdb29243..f1d42a3f8f 100644 --- a/services/proxy/pkg/config/defaults/defaultconfig.go +++ b/services/proxy/pkg/config/defaults/defaultconfig.go @@ -185,7 +185,7 @@ func DefaultPolicies() []config.Policy { }, { Type: config.QueryRoute, - Endpoint: "(/remote.php)?/?preview=1", + Endpoint: "/remote.php/?preview=1", Service: "eu.opencloud.web.webdav", }, // TODO the actual REPORT goes to /dav/files/{username}, which is user specific ... how would this work in a spaces world? From b865d7c2f20ae195e185b9d6aa61b4f53a5800dd Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Thu, 24 Jul 2025 14:53:01 +0200 Subject: [PATCH 8/8] bump libre-graph-api-go Signed-off-by: Christian Richter --- go.mod | 2 +- go.sum | 4 ++-- .../libre-graph-api-go/api_me_drive.go | 20 +++++++++++++++++++ vendor/modules.txt | 2 +- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index d8d649cfa9..66ea34c2f5 100644 --- a/go.mod +++ b/go.mod @@ -63,7 +63,7 @@ require ( github.com/onsi/ginkgo/v2 v2.23.4 github.com/onsi/gomega v1.37.0 github.com/open-policy-agent/opa v1.6.0 - github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250707143759-32eaae12b2ce + github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76 github.com/opencloud-eu/reva/v2 v2.35.0 github.com/orcaman/concurrent-map v1.0.0 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index b0d0dd3850..364672b057 100644 --- a/go.sum +++ b/go.sum @@ -866,8 +866,8 @@ github.com/open-policy-agent/opa v1.6.0 h1:/S/cnNQJ2MUMNzizHPbisTWBHowmLkPrugY5j github.com/open-policy-agent/opa v1.6.0/go.mod h1:zFmw4P+W62+CWGYRDDswfVYSCnPo6oYaktQnfIaRFC4= github.com/opencloud-eu/go-micro-plugins/v4/store/nats-js-kv v0.0.0-20250512152754-23325793059a h1:Sakl76blJAaM6NxylVkgSzktjo2dS504iDotEFJsh3M= github.com/opencloud-eu/go-micro-plugins/v4/store/nats-js-kv v0.0.0-20250512152754-23325793059a/go.mod h1:pjcozWijkNPbEtX5SIQaxEW/h8VAVZYTLx+70bmB3LY= -github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250707143759-32eaae12b2ce h1:tjbIYsW5CFsEbCf5B/KN0Mo1oKU/K+oipgFm2B6wzG4= -github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250707143759-32eaae12b2ce/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q= +github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76 h1:vD/EdfDUrv4omSFjrinT8Mvf+8D7f9g4vgQ2oiDrVUI= +github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q= github.com/opencloud-eu/reva/v2 v2.35.0 h1:lKxGiI9yFD7MTeyFJa68BQD+DiB1rQvhC8QePa/Vlc4= github.com/opencloud-eu/reva/v2 v2.35.0/go.mod h1:UVPwuMjfgPekuh7unWavJSiPihgmk1GYF3xct0q3+X0= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= diff --git a/vendor/github.com/opencloud-eu/libre-graph-api-go/api_me_drive.go b/vendor/github.com/opencloud-eu/libre-graph-api-go/api_me_drive.go index 3f11aefb07..ef79c7fe47 100644 --- a/vendor/github.com/opencloud-eu/libre-graph-api-go/api_me_drive.go +++ b/vendor/github.com/opencloud-eu/libre-graph-api-go/api_me_drive.go @@ -130,6 +130,13 @@ func (a *MeDriveApiService) GetHomeExecute(r ApiGetHomeRequest) (*Drive, *http.R type ApiListSharedByMeRequest struct { ctx context.Context ApiService *MeDriveApiService + expand *[]string +} + +// Expand related entities +func (r ApiListSharedByMeRequest) Expand(expand []string) ApiListSharedByMeRequest { + r.expand = &expand + return r } func (r ApiListSharedByMeRequest) Execute() (*CollectionOfDriveItems1, *http.Response, error) { @@ -173,6 +180,9 @@ func (a *MeDriveApiService) ListSharedByMeExecute(r ApiListSharedByMeRequest) (* localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.expand != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "form", "csv") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -238,6 +248,13 @@ func (a *MeDriveApiService) ListSharedByMeExecute(r ApiListSharedByMeRequest) (* type ApiListSharedWithMeRequest struct { ctx context.Context ApiService *MeDriveApiService + expand *[]string +} + +// Expand related entities +func (r ApiListSharedWithMeRequest) Expand(expand []string) ApiListSharedWithMeRequest { + r.expand = &expand + return r } func (r ApiListSharedWithMeRequest) Execute() (*CollectionOfDriveItems1, *http.Response, error) { @@ -281,6 +298,9 @@ func (a *MeDriveApiService) ListSharedWithMeExecute(r ApiListSharedWithMeRequest localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.expand != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "form", "csv") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/vendor/modules.txt b/vendor/modules.txt index 8924ad4d5a..6f653f8d91 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1210,7 +1210,7 @@ github.com/open-policy-agent/opa/v1/types github.com/open-policy-agent/opa/v1/util github.com/open-policy-agent/opa/v1/util/decoding github.com/open-policy-agent/opa/v1/version -# github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250707143759-32eaae12b2ce +# github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76 ## explicit; go 1.18 github.com/opencloud-eu/libre-graph-api-go # github.com/opencloud-eu/reva/v2 v2.35.0