From 1d2929932b442408374b59d957d4a109bbf74a9e Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Fri, 15 Jul 2022 20:40:45 +0200 Subject: [PATCH 1/5] update reva --- .../2.0.0_2022-06-28/update-reva-beta.5.md | 30 +++++++++++++++++-- go.mod | 4 +-- go.sum | 12 +++----- 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/changelog/2.0.0_2022-06-28/update-reva-beta.5.md b/changelog/2.0.0_2022-06-28/update-reva-beta.5.md index 55e41aad6f2..9e1fd67fba7 100644 --- a/changelog/2.0.0_2022-06-28/update-reva-beta.5.md +++ b/changelog/2.0.0_2022-06-28/update-reva-beta.5.md @@ -1,3 +1,29 @@ -Enhancement: Update reva +Enhancement: Update reva to version 2.7.1 -https://github.com/owncloud/ocis/pull/4025 \ No newline at end of file +Changelog for reva 2.7.1 (2022-07-15) +======================================= + +* Bugfix [cs3org/reva#3080](https://github.com/cs3org/reva/pull/3080): Make dataproviders return more headers +* Enhancement [cs3org/reva#4072](https://github.com/cs3org/reva/pull/4072): Add user filter + +Changelog for reva 2.7.0 (2022-07-15) +======================================= + +* Bugfix [cs3org/reva#3075](https://github.com/cs3org/reva/pull/3075): Check permissions of the move operation destination +* Bugfix [cs3org/reva#3036](https://github.com/cs3org/reva/pull/3036): * Bugfix revad with EOS docker image +* Bugfix [cs3org/reva#3037](https://github.com/cs3org/reva/pull/3037): Add uid- and gidNumber to LDAP queries +* Bugfix [cs3org/reva#4061](https://github.com/cs3org/reva/pull/4061): Forbid resharing with higher permissions +* Bugfix [cs3org/reva#3017](https://github.com/cs3org/reva/pull/3017): Removed unused gateway config "commit_share_to_storage_ref" +* Bugfix [cs3org/reva#3031](https://github.com/cs3org/reva/pull/3031): Return proper response code when detecting recursive copy/move operations +* Bugfix [cs3org/reva#3071](https://github.com/cs3org/reva/pull/3071): Make CS3 sharing drivers parse legacy resource id +* Bugfix [cs3org/reva#3035](https://github.com/cs3org/reva/pull/3035): Prevent cross space move +* Bugfix [cs3org/reva#3074](https://github.com/cs3org/reva/pull/3074): Send storage provider and space id to wopi server +* Bugfix [cs3org/reva#3022](https://github.com/cs3org/reva/pull/3022): Improve the sharing internals +* Bugfix [cs3org/reva#2977](https://github.com/cs3org/reva/pull/2977): Test valid filename on spaces tus upload +* Change [cs3org/reva#3006](https://github.com/cs3org/reva/pull/3006): Use spaceID on the cs3api +* Enhancement [cs3org/reva#3043](https://github.com/cs3org/reva/pull/3043): Introduce LookupCtx for index interface +* Enhancement [cs3org/reva#3009](https://github.com/cs3org/reva/pull/3009): Prevent recursive copy/move operations +* Enhancement [cs3org/reva#2977](https://github.com/cs3org/reva/pull/2977): Skip space lookup on space propfind + +https://github.com/owncloud/ocis/pull/4025 +https://github.com/owncloud/ocis/pull/4211 diff --git a/go.mod b/go.mod index ef16925fb6f..298c5709ec7 100644 --- a/go.mod +++ b/go.mod @@ -9,8 +9,8 @@ require ( github.com/blevesearch/bleve/v2 v2.3.3 github.com/blevesearch/bleve_index_api v1.0.2 github.com/coreos/go-oidc/v3 v3.2.0 - github.com/cs3org/go-cs3apis v0.0.0-20220621145831-c38cca0796c2 - github.com/cs3org/reva/v2 v2.6.2-0.20220714144818-50902dd7ce4c + github.com/cs3org/go-cs3apis v0.0.0-20220711084433-8f71d4e812a3 + github.com/cs3org/reva/v2 v2.7.1 github.com/disintegration/imaging v1.6.2 github.com/ggwhite/go-masker v1.0.9 github.com/go-chi/chi/v5 v5.0.7 diff --git a/go.sum b/go.sum index e27b4617fa5..b1e000ff6f9 100644 --- a/go.sum +++ b/go.sum @@ -297,14 +297,10 @@ github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3p github.com/crewjam/saml v0.4.6 h1:XCUFPkQSJLvzyl4cW9OvpWUbRf0gE7VUpU8ZnilbeM4= github.com/crewjam/saml v0.4.6/go.mod h1:ZBOXnNPFzB3CgOkRm7Nd6IVdkG+l/wF+0ZXLqD96t1A= github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4= -github.com/cs3org/go-cs3apis v0.0.0-20220621145831-c38cca0796c2 h1:o/ovJzS4pyL/rZgp0MtC4Q7JIle5DikimilTLBw2TjY= -github.com/cs3org/go-cs3apis v0.0.0-20220621145831-c38cca0796c2/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= -github.com/cs3org/reva/v2 v2.6.2-0.20220713155727-4ad9ffbece11 h1:ktTi/LPNOn4C/dFlzdlODls70hrUN7qaIpjhnfeyu0o= -github.com/cs3org/reva/v2 v2.6.2-0.20220713155727-4ad9ffbece11/go.mod h1:GlPiCJmt6nDrbPm6lL7pShonSUZ0Ld2GLtR+lATjLCE= -github.com/cs3org/reva/v2 v2.6.2-0.20220714110232-75f2c2f83657 h1:RTnvpkaKElXO7u6TGz0WlSAJxK6pifOATDYWkDhbtso= -github.com/cs3org/reva/v2 v2.6.2-0.20220714110232-75f2c2f83657/go.mod h1:GlPiCJmt6nDrbPm6lL7pShonSUZ0Ld2GLtR+lATjLCE= -github.com/cs3org/reva/v2 v2.6.2-0.20220714144818-50902dd7ce4c h1:iJtwhUDAtwSS7lj92c3m75Il6jGbdB0oLTnAgPxlRDk= -github.com/cs3org/reva/v2 v2.6.2-0.20220714144818-50902dd7ce4c/go.mod h1:GlPiCJmt6nDrbPm6lL7pShonSUZ0Ld2GLtR+lATjLCE= +github.com/cs3org/go-cs3apis v0.0.0-20220711084433-8f71d4e812a3 h1:QSQ2DGKPMChB4vHSs1Os9TnOJl21BrzKX9D5EtQfDog= +github.com/cs3org/go-cs3apis v0.0.0-20220711084433-8f71d4e812a3/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= +github.com/cs3org/reva/v2 v2.7.1 h1:IcI4cx+6J3MVVk17B9wim130yBkW6YyGRDvfpypGQ2g= +github.com/cs3org/reva/v2 v2.7.1/go.mod h1:gbbAUK+8gmyTJ8J+JWwbKbKRlpNRcoMuAXNFN0HbfIE= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= From 8e04b28365a93731c5cef18fc20a18441aa78a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Mon, 18 Jul 2022 09:13:37 +0000 Subject: [PATCH 2/5] bump reva to 95ef49d211e494 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- go.mod | 2 ++ go.sum | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 298c5709ec7..25c7ceb63ab 100644 --- a/go.mod +++ b/go.mod @@ -266,3 +266,5 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect stash.kopano.io/kgol/kcc-go/v5 v5.0.1 // indirect ) + +replace github.com/cs3org/reva/v2 => github.com/butonic/reva/v2 v2.0.0-20220718111151-9e683197d0f3 diff --git a/go.sum b/go.sum index b1e000ff6f9..d58169ba286 100644 --- a/go.sum +++ b/go.sum @@ -221,6 +221,8 @@ github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+Wji github.com/bmizerany/pat v0.0.0-20210406213842-e4b6760bdd6f h1:gOO/tNZMjjvTKZWpY7YnXC72ULNLErRtp94LountVE8= github.com/bmizerany/pat v0.0.0-20210406213842-e4b6760bdd6f/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/butonic/reva/v2 v2.0.0-20220718111151-9e683197d0f3 h1:l+PnU/Ki4HOW84ioFreDE7NfpDbJxGZTsROTpphefeo= +github.com/butonic/reva/v2 v2.0.0-20220718111151-9e683197d0f3/go.mod h1:gbbAUK+8gmyTJ8J+JWwbKbKRlpNRcoMuAXNFN0HbfIE= github.com/c-bata/go-prompt v0.2.5/go.mod h1:vFnjEGDIIA/Lib7giyE4E9c50Lvl8j0S+7FVlAwDAVw= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -299,8 +301,6 @@ github.com/crewjam/saml v0.4.6/go.mod h1:ZBOXnNPFzB3CgOkRm7Nd6IVdkG+l/wF+0ZXLqD9 github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4= github.com/cs3org/go-cs3apis v0.0.0-20220711084433-8f71d4e812a3 h1:QSQ2DGKPMChB4vHSs1Os9TnOJl21BrzKX9D5EtQfDog= github.com/cs3org/go-cs3apis v0.0.0-20220711084433-8f71d4e812a3/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= -github.com/cs3org/reva/v2 v2.7.1 h1:IcI4cx+6J3MVVk17B9wim130yBkW6YyGRDvfpypGQ2g= -github.com/cs3org/reva/v2 v2.7.1/go.mod h1:gbbAUK+8gmyTJ8J+JWwbKbKRlpNRcoMuAXNFN0HbfIE= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= From e436ff0c6a5e3e91a2254d27a39f4dabf762155d Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Mon, 18 Jul 2022 11:43:20 +0200 Subject: [PATCH 3/5] fix owner on non personal spaces --- services/graph/pkg/service/v0/drives.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/graph/pkg/service/v0/drives.go b/services/graph/pkg/service/v0/drives.go index 9ec9984dbf8..c43f300dd0e 100644 --- a/services/graph/pkg/service/v0/drives.go +++ b/services/graph/pkg/service/v0/drives.go @@ -223,7 +223,6 @@ func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request) { } csr := storageprovider.CreateStorageSpaceRequest{ - Owner: us, Type: driveType, Name: spaceName, Quota: getQuota(drive.Quota, g.config.Spaces.DefaultQuota), @@ -237,6 +236,10 @@ func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request) { csr.Opaque = utils.AppendPlainToOpaque(csr.Opaque, "spaceAlias", *drive.DriveAlias) } + if driveType == "personal" { + csr.Owner = us + } + resp, err := client.CreateStorageSpace(r.Context(), &csr) if err != nil { errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, err.Error()) From d99523b3da6c7888672a2b5e0425779872755116 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Mon, 18 Jul 2022 16:49:08 +0200 Subject: [PATCH 4/5] update reva to v2.7.2 --- changelog/2.0.0_2022-06-28/update-reva-beta.5.md | 11 +++++++++-- go.mod | 4 +--- go.sum | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/changelog/2.0.0_2022-06-28/update-reva-beta.5.md b/changelog/2.0.0_2022-06-28/update-reva-beta.5.md index 9e1fd67fba7..438c5e09d6a 100644 --- a/changelog/2.0.0_2022-06-28/update-reva-beta.5.md +++ b/changelog/2.0.0_2022-06-28/update-reva-beta.5.md @@ -1,10 +1,17 @@ -Enhancement: Update reva to version 2.7.1 +Enhancement: Update reva to version 2.7.2 + +Changelog for reva 2.7.2 (2022-07-18) +======================================= + +* Bugfix [cs3org/reva#3079](https://github.com/cs3org/reva/pull/3079): Allow empty permissions +* Bugfix [cs3org/reva#3084](https://github.com/cs3org/reva/pull/3084): Spaces related permissions and providerID cleanup +* Bugfix [cs3org/reva#3083](https://github.com/cs3org/reva/pull/3083): Add space id to ItemTrashed event Changelog for reva 2.7.1 (2022-07-15) ======================================= * Bugfix [cs3org/reva#3080](https://github.com/cs3org/reva/pull/3080): Make dataproviders return more headers -* Enhancement [cs3org/reva#4072](https://github.com/cs3org/reva/pull/4072): Add user filter +* Enhancement [cs3org/reva#3046](https://github.com/cs3org/reva/pull/3046): Add user filter Changelog for reva 2.7.0 (2022-07-15) ======================================= diff --git a/go.mod b/go.mod index 25c7ceb63ab..5a77407adcd 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/blevesearch/bleve_index_api v1.0.2 github.com/coreos/go-oidc/v3 v3.2.0 github.com/cs3org/go-cs3apis v0.0.0-20220711084433-8f71d4e812a3 - github.com/cs3org/reva/v2 v2.7.1 + github.com/cs3org/reva/v2 v2.7.2 github.com/disintegration/imaging v1.6.2 github.com/ggwhite/go-masker v1.0.9 github.com/go-chi/chi/v5 v5.0.7 @@ -266,5 +266,3 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect stash.kopano.io/kgol/kcc-go/v5 v5.0.1 // indirect ) - -replace github.com/cs3org/reva/v2 => github.com/butonic/reva/v2 v2.0.0-20220718111151-9e683197d0f3 diff --git a/go.sum b/go.sum index d58169ba286..6dfc9ff9f58 100644 --- a/go.sum +++ b/go.sum @@ -221,8 +221,6 @@ github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+Wji github.com/bmizerany/pat v0.0.0-20210406213842-e4b6760bdd6f h1:gOO/tNZMjjvTKZWpY7YnXC72ULNLErRtp94LountVE8= github.com/bmizerany/pat v0.0.0-20210406213842-e4b6760bdd6f/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/butonic/reva/v2 v2.0.0-20220718111151-9e683197d0f3 h1:l+PnU/Ki4HOW84ioFreDE7NfpDbJxGZTsROTpphefeo= -github.com/butonic/reva/v2 v2.0.0-20220718111151-9e683197d0f3/go.mod h1:gbbAUK+8gmyTJ8J+JWwbKbKRlpNRcoMuAXNFN0HbfIE= github.com/c-bata/go-prompt v0.2.5/go.mod h1:vFnjEGDIIA/Lib7giyE4E9c50Lvl8j0S+7FVlAwDAVw= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -301,6 +299,8 @@ github.com/crewjam/saml v0.4.6/go.mod h1:ZBOXnNPFzB3CgOkRm7Nd6IVdkG+l/wF+0ZXLqD9 github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4= github.com/cs3org/go-cs3apis v0.0.0-20220711084433-8f71d4e812a3 h1:QSQ2DGKPMChB4vHSs1Os9TnOJl21BrzKX9D5EtQfDog= github.com/cs3org/go-cs3apis v0.0.0-20220711084433-8f71d4e812a3/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= +github.com/cs3org/reva/v2 v2.7.2 h1:R6+tlAYDZz2ylUvq3KWBDMmsyLOD7yJpe51GzIZpWr0= +github.com/cs3org/reva/v2 v2.7.2/go.mod h1:gbbAUK+8gmyTJ8J+JWwbKbKRlpNRcoMuAXNFN0HbfIE= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= From 41d03a49e7129d2a2f246d02a55d9803cdd12344 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Mon, 18 Jul 2022 17:26:32 +0200 Subject: [PATCH 5/5] leave the owner set --- services/graph/pkg/service/v0/drives.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/services/graph/pkg/service/v0/drives.go b/services/graph/pkg/service/v0/drives.go index c43f300dd0e..9ec9984dbf8 100644 --- a/services/graph/pkg/service/v0/drives.go +++ b/services/graph/pkg/service/v0/drives.go @@ -223,6 +223,7 @@ func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request) { } csr := storageprovider.CreateStorageSpaceRequest{ + Owner: us, Type: driveType, Name: spaceName, Quota: getQuota(drive.Quota, g.config.Spaces.DefaultQuota), @@ -236,10 +237,6 @@ func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request) { csr.Opaque = utils.AppendPlainToOpaque(csr.Opaque, "spaceAlias", *drive.DriveAlias) } - if driveType == "personal" { - csr.Owner = us - } - resp, err := client.CreateStorageSpace(r.Context(), &csr) if err != nil { errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, err.Error())