From e975e8f7501d143142aa11275ed202eba70e2bcb Mon Sep 17 00:00:00 2001 From: Roman Perekhod Date: Wed, 26 Feb 2025 17:41:56 +0100 Subject: [PATCH] Fix the OCM role editor permission set. The redundant permissions have been removed. --- changelog/unreleased/fix-ocm-role-editor.md | 6 ++++++ go.mod | 2 +- go.sum | 4 ++-- .../expected-failures-localAPI-on-OCIS-storage.md | 8 ++++---- tests/acceptance/features/apiOcm/share.feature | 6 +++++- .../reva/v2/internal/http/services/ocmd/protocols.go | 3 --- vendor/modules.txt | 2 +- 7 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 changelog/unreleased/fix-ocm-role-editor.md diff --git a/changelog/unreleased/fix-ocm-role-editor.md b/changelog/unreleased/fix-ocm-role-editor.md new file mode 100644 index 00000000000..f09a95ae14d --- /dev/null +++ b/changelog/unreleased/fix-ocm-role-editor.md @@ -0,0 +1,6 @@ +Bugfix: Fix the OCM role editor + +Fix the OCM role editor permission set. The redundant permissions have been removed. + +https://github.com/owncloud/ocis/pull/11071 +https://github.com/owncloud/ocis/issues/11054 diff --git a/go.mod b/go.mod index 0f3982a4e2b..2434521b11e 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/cenkalti/backoff v2.2.1+incompatible github.com/coreos/go-oidc/v3 v3.11.0 github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1 - github.com/cs3org/reva/v2 v2.27.6 + github.com/cs3org/reva/v2 v2.27.7-0.20250227083029-8e8638eee60f github.com/davidbyttow/govips/v2 v2.16.0 github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8 github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e diff --git a/go.sum b/go.sum index 265e1c99143..68c52b4b7f9 100644 --- a/go.sum +++ b/go.sum @@ -249,8 +249,8 @@ github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c= github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME= github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1 h1:RU6LT6mkD16xZs011+8foU7T3LrPvTTSWeTQ9OgfhkA= github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1/go.mod h1:DedpcqXl193qF/08Y04IO0PpxyyMu8+GrkD6kWK2MEQ= -github.com/cs3org/reva/v2 v2.27.6 h1:gRUBAo8NdDRVdeIDfLUCVvtADq48BROC6QZJBpN8PSg= -github.com/cs3org/reva/v2 v2.27.6/go.mod h1:1H26PMXoa1rDrIoZ7lGOerq1Bg07/5srYfRaKfxBSsc= +github.com/cs3org/reva/v2 v2.27.7-0.20250227083029-8e8638eee60f h1:3tWJL4iYeHce7ksppR9yK/+pZpDsN+XSMKV+CDC0sAA= +github.com/cs3org/reva/v2 v2.27.7-0.20250227083029-8e8638eee60f/go.mod h1:1H26PMXoa1rDrIoZ7lGOerq1Bg07/5srYfRaKfxBSsc= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo= github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index d3c7bfce5a4..d18b07fee2d 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -329,12 +329,12 @@ The expected failures in this file are from features in the owncloud/ocis repo. - [apiOcm/acceptInvitation.feature:148](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/acceptInvitation.feature#L148) #### [[OCM] Sharee can access expired federated share](https://github.com/owncloud/ocis/issues/11033) -- [apiOcm/share.feature:1154](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L1154) -- [apiOcm/share.feature:1174](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L1174) +- [apiOcm/share.feature:1158](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L1158) +- [apiOcm/share.feature:1178](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L1178) #### [[OCM] Hide & Enable Sync fail with received federated shares](https://github.com/owncloud/ocis/issues/10719) -- [apiOcm/share.feature:1194](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L1194) -- [apiOcm/share.feature:1218](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L1218) +- [apiOcm/share.feature:1198](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L1198) +- [apiOcm/share.feature:1222](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L1222) #### [[OCM] federated user trying to download file shared with permissions role Secure Viewer returns 500 status code](https://github.com/owncloud/ocis/issues/10822) - [apiOcm/enableDisablePermissionsRole.feature:18](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/enableDisablePermissionsRole.feature#L18) diff --git a/tests/acceptance/features/apiOcm/share.feature b/tests/acceptance/features/apiOcm/share.feature index fa4b6c4ef8f..53bc661b2af 100755 --- a/tests/acceptance/features/apiOcm/share.feature +++ b/tests/acceptance/features/apiOcm/share.feature @@ -1012,7 +1012,11 @@ Feature: an user shares resources using ScienceMesh application "maxItems": 1, "items": { "type": "object", - "required": ["@libre.graph.permissions.actions"] + "properties": { + "@libre.graph.permissions.actions": { + "type": "null" + } + } } } } diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/protocols.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/protocols.go index 882f42b4a9f..00e2d51f117 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/protocols.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/protocols.go @@ -70,9 +70,6 @@ func (w *WebDAV) ToOCMProtocol() *ocm.Protocol { perms.Permissions.CreateContainer = true perms.Permissions.Delete = true perms.Permissions.Move = true - perms.Permissions.ListGrants = true - case "share": - perms.Reshare = true } } diff --git a/vendor/modules.txt b/vendor/modules.txt index 6ef924620a0..68ea6545332 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -371,7 +371,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.27.6 +# github.com/cs3org/reva/v2 v2.27.7-0.20250227083029-8e8638eee60f ## explicit; go 1.22.7 github.com/cs3org/reva/v2/cmd/revad/internal/grace github.com/cs3org/reva/v2/cmd/revad/runtime