From e7a46dca553e24efdb803b398c9f09f9b8a8ce96 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Tue, 2 Jan 2024 12:06:07 +0100 Subject: [PATCH] fix: update reva to fix status codes --- changelog/unreleased/bump-reva.md | 5 +++++ go.mod | 2 +- go.sum | 2 ++ .../v2/internal/grpc/services/gateway/storageprovider.go | 2 +- .../services/sharesstorageprovider/sharesstorageprovider.go | 2 +- .../reva/v2/internal/http/services/owncloud/ocdav/move.go | 2 ++ vendor/modules.txt | 2 +- 7 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 changelog/unreleased/bump-reva.md diff --git a/changelog/unreleased/bump-reva.md b/changelog/unreleased/bump-reva.md new file mode 100644 index 0000000000..81e2d51d5e --- /dev/null +++ b/changelog/unreleased/bump-reva.md @@ -0,0 +1,5 @@ +Enhancement: Update reva to latest edge version + +We update reva to the latest edge version to get the latest fixes and features. + +https://github.com/owncloud/ocis/pull/8100 diff --git a/go.mod b/go.mod index 5f8c3fb54c..4dbdc86185 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/coreos/go-oidc v2.2.1+incompatible github.com/coreos/go-oidc/v3 v3.9.0 github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781 - github.com/cs3org/reva/v2 v2.18.0 + github.com/cs3org/reva/v2 v2.18.1-0.20240102110246-e8443f274000 github.com/dhowden/tag v0.0.0-20230630033851-978a0926ee25 github.com/disintegration/imaging v1.6.2 github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e diff --git a/go.sum b/go.sum index 9e66d0a6e8..d6a3151757 100644 --- a/go.sum +++ b/go.sum @@ -1023,6 +1023,8 @@ github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781 h1:BUdwkIlf8IS2F github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= github.com/cs3org/reva/v2 v2.18.0 h1:ZfPE+0fgp1ptLIVF+xhMwwQRG1je2OFumMVqjE42AR4= github.com/cs3org/reva/v2 v2.18.0/go.mod h1:QW31Q1IQ9ZCJMFv3u8/SdHSyLfCcSVNcRbqIJj+Y+7o= +github.com/cs3org/reva/v2 v2.18.1-0.20240102110246-e8443f274000 h1:HO7rqvYYSGLLpOo5s7/TIJjh/6xu6o/VsyUS4sXcuhA= +github.com/cs3org/reva/v2 v2.18.1-0.20240102110246-e8443f274000/go.mod h1:QW31Q1IQ9ZCJMFv3u8/SdHSyLfCcSVNcRbqIJj+Y+7o= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/storageprovider.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/storageprovider.go index 5347f4bacd..6c1ac74245 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/storageprovider.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/gateway/storageprovider.go @@ -709,7 +709,7 @@ func (s *svc) Move(ctx context.Context, req *provider.MoveRequest) (*provider.Mo if sourceProviderInfo.Address != destProviderInfo.Address { return &provider.MoveResponse{ - Status: status.NewUnimplemented(ctx, nil, "gateway does not support cross storage move, use copy and delete"), + Status: status.NewPermissionDenied(ctx, nil, "cross storage moves are not permitted, use copy and delete"), }, nil } diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go index 40b48be42d..7904acc508 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go @@ -666,7 +666,7 @@ func (s *service) Move(ctx context.Context, req *provider.MoveRequest) (*provide if dstReceivedShare.Share.Id.OpaqueId != srcReceivedShare.Share.Id.OpaqueId { return &provider.MoveResponse{ - Status: status.NewUnimplemented(ctx, nil, "sharesstorageprovider: can not move between shares"), + Status: status.NewPermissionDenied(ctx, nil, "cross storage moves are not permitted, use copy and delete"), }, nil } diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/move.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/move.go index bf45df209b..fbd51ee72f 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/move.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/move.go @@ -281,6 +281,8 @@ func (s *svc) handleMove(ctx context.Context, w http.ResponseWriter, r *http.Req switch mRes.Status.Code { case rpc.Code_CODE_ABORTED: status = http.StatusPreconditionFailed + case rpc.Code_CODE_PERMISSION_DENIED: + status = http.StatusForbidden case rpc.Code_CODE_UNIMPLEMENTED: // We translate this into a Bad Gateway error as per https://www.rfc-editor.org/rfc/rfc4918#section-9.9.4 // > 502 (Bad Gateway) - This may occur when the destination is on another diff --git a/vendor/modules.txt b/vendor/modules.txt index 090b3a0260..c4703ed465 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -362,7 +362,7 @@ github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1 github.com/cs3org/go-cs3apis/cs3/storage/registry/v1beta1 github.com/cs3org/go-cs3apis/cs3/tx/v1beta1 github.com/cs3org/go-cs3apis/cs3/types/v1beta1 -# github.com/cs3org/reva/v2 v2.18.0 +# github.com/cs3org/reva/v2 v2.18.1-0.20240102110246-e8443f274000 ## explicit; go 1.21 github.com/cs3org/reva/v2/cmd/revad/internal/grace github.com/cs3org/reva/v2/cmd/revad/runtime