From 3cb78021d2d1cb6fb04fa42499a216e8fb73d018 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Fri, 29 Apr 2022 10:04:16 +0200 Subject: [PATCH 01/16] bump reva Signed-off-by: jkoberg --- go.mod | 2 +- go.sum | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index abb9d949f2f..3f05be5fc43 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/blevesearch/bleve/v2 v2.3.2 github.com/coreos/go-oidc/v3 v3.1.0 github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde - github.com/cs3org/reva/v2 v2.0.0-20220427203355-0164880ac7d3 + github.com/cs3org/reva/v2 v2.0.0-20220429070444-b061a451e550 github.com/disintegration/imaging v1.6.2 github.com/glauth/glauth/v2 v2.0.0-20211021011345-ef3151c28733 github.com/go-chi/chi/v5 v5.0.7 diff --git a/go.sum b/go.sum index 97e90625a25..eaf9b305d06 100644 --- a/go.sum +++ b/go.sum @@ -318,10 +318,8 @@ github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde h1:WrD9O8ZaWvsm0 github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= github.com/cs3org/reva v1.18.0 h1:MbPS5ZAa8RzKcTxAVeSDdISB3XXqLIxqB03BTN5ReBY= github.com/cs3org/reva v1.18.0/go.mod h1:e5VDUDu4vVWIeVkZcW//n6UZzhGGMa+Tz/whCiX3N6o= -github.com/cs3org/reva/v2 v2.0.0-20220427133111-618964eed515 h1:8pPCLxNXVz/q7PMM6Zq1lff3P8SFAu8/CXwB2eA21xc= -github.com/cs3org/reva/v2 v2.0.0-20220427133111-618964eed515/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= -github.com/cs3org/reva/v2 v2.0.0-20220427203355-0164880ac7d3 h1:6sKjGI0AUW5tBXWBduaBoc+9sNYZWQR894G0oFCbus0= -github.com/cs3org/reva/v2 v2.0.0-20220427203355-0164880ac7d3/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= +github.com/cs3org/reva/v2 v2.0.0-20220429070444-b061a451e550 h1:6WV6v7u5pBwvuP+QVZXg2NP8/PHyikqxQGNoqTmFRDE= +github.com/cs3org/reva/v2 v2.0.0-20220429070444-b061a451e550/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= 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 23c1f155ab1cd953bf5128a7fb6c2328fbb66b20 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Fri, 29 Apr 2022 10:05:54 +0200 Subject: [PATCH 02/16] use feature core commitid Signed-off-by: jkoberg --- changelog/unreleased/update-reva.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog/unreleased/update-reva.md b/changelog/unreleased/update-reva.md index 0cce56ff613..8b4b79c912f 100644 --- a/changelog/unreleased/update-reva.md +++ b/changelog/unreleased/update-reva.md @@ -9,3 +9,4 @@ https://github.com/owncloud/ocis/pull/3570 https://github.com/owncloud/ocis/pull/3601 https://github.com/owncloud/ocis/pull/3605 https://github.com/owncloud/ocis/pull/3611 +https://github.com/owncloud/ocis/pull/3621 From c1e7aa38763955ad7f3cfcc13710a3ae9b01e997 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Fri, 29 Apr 2022 15:13:59 +0200 Subject: [PATCH 03/16] next reva version Signed-off-by: jkoberg --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3f05be5fc43..4b11b0bf355 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/blevesearch/bleve/v2 v2.3.2 github.com/coreos/go-oidc/v3 v3.1.0 github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde - github.com/cs3org/reva/v2 v2.0.0-20220429070444-b061a451e550 + github.com/cs3org/reva/v2 v2.0.0-20220429121623-54cc99414f5a github.com/disintegration/imaging v1.6.2 github.com/glauth/glauth/v2 v2.0.0-20211021011345-ef3151c28733 github.com/go-chi/chi/v5 v5.0.7 diff --git a/go.sum b/go.sum index eaf9b305d06..a268317a849 100644 --- a/go.sum +++ b/go.sum @@ -318,8 +318,8 @@ github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde h1:WrD9O8ZaWvsm0 github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= github.com/cs3org/reva v1.18.0 h1:MbPS5ZAa8RzKcTxAVeSDdISB3XXqLIxqB03BTN5ReBY= github.com/cs3org/reva v1.18.0/go.mod h1:e5VDUDu4vVWIeVkZcW//n6UZzhGGMa+Tz/whCiX3N6o= -github.com/cs3org/reva/v2 v2.0.0-20220429070444-b061a451e550 h1:6WV6v7u5pBwvuP+QVZXg2NP8/PHyikqxQGNoqTmFRDE= -github.com/cs3org/reva/v2 v2.0.0-20220429070444-b061a451e550/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= +github.com/cs3org/reva/v2 v2.0.0-20220429121623-54cc99414f5a h1:vDUZ74Tq2WvSjTb8Jch7rHJU61LPEDGoKapQ+DQ4Oy8= +github.com/cs3org/reva/v2 v2.0.0-20220429121623-54cc99414f5a/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= 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 dd9acdce7ae9418ca30d3829fb4db6d34d65f378 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Fri, 29 Apr 2022 15:19:13 +0200 Subject: [PATCH 04/16] fix audit service Signed-off-by: jkoberg --- extensions/audit/pkg/service/service_test.go | 26 ++++++++++---------- extensions/audit/pkg/types/conversion.go | 14 +++++------ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/extensions/audit/pkg/service/service_test.go b/extensions/audit/pkg/service/service_test.go index 6fb5dc1ea0e..6d45dfde1a3 100644 --- a/extensions/audit/pkg/service/service_test.go +++ b/extensions/audit/pkg/service/service_test.go @@ -297,8 +297,8 @@ var testCases = []struct { }, { Alias: "File created", SystemEvent: events.FileUploaded{ - FileID: reference("sto-123", "iid-123", "./item"), - Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva + Ref: reference("sto-123", "iid-123", "./item"), + Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva }, CheckAuditEvent: func(t *testing.T, b []byte) { ev := types.AuditEventFileCreated{} @@ -312,8 +312,8 @@ var testCases = []struct { }, { Alias: "File read", SystemEvent: events.FileDownloaded{ - FileID: reference("sto-123", "iid-123", "./item"), - Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva + Ref: reference("sto-123", "iid-123", "./item"), + Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva }, CheckAuditEvent: func(t *testing.T, b []byte) { ev := types.AuditEventFileRead{} @@ -327,8 +327,8 @@ var testCases = []struct { }, { Alias: "File trashed", SystemEvent: events.ItemTrashed{ - FileID: reference("sto-123", "iid-123", "./item"), - Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva + Ref: reference("sto-123", "iid-123", "./item"), + Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva }, CheckAuditEvent: func(t *testing.T, b []byte) { ev := types.AuditEventFileDeleted{} @@ -342,7 +342,7 @@ var testCases = []struct { }, { Alias: "File renamed", SystemEvent: events.ItemMoved{ - FileID: reference("sto-123", "iid-123", "./item"), + Ref: reference("sto-123", "iid-123", "./item"), OldReference: reference("sto-123", "iid-123", "./anotheritem"), Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva }, @@ -361,8 +361,8 @@ var testCases = []struct { }, { Alias: "File purged", SystemEvent: events.ItemPurged{ - FileID: reference("sto-123", "iid-123", "./item"), - Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva + Ref: reference("sto-123", "iid-123", "./item"), + Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva }, CheckAuditEvent: func(t *testing.T, b []byte) { ev := types.AuditEventFilePurged{} @@ -376,7 +376,7 @@ var testCases = []struct { }, { Alias: "File restored", SystemEvent: events.ItemRestored{ - FileID: reference("sto-123", "iid-123", "./item"), + Ref: reference("sto-123", "iid-123", "./item"), Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva OldReference: reference("sto-123", "sto-123!iid-123/item", "./oldpath"), Key: "", @@ -396,9 +396,9 @@ var testCases = []struct { }, { Alias: "File version restored", SystemEvent: events.FileVersionRestored{ - FileID: reference("sto-123", "iid-123", "./item"), - Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva - Key: "v1", + Ref: reference("sto-123", "iid-123", "./item"), + Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva + Key: "v1", }, CheckAuditEvent: func(t *testing.T, b []byte) { ev := types.AuditEventFileVersionRestored{} diff --git a/extensions/audit/pkg/types/conversion.go b/extensions/audit/pkg/types/conversion.go index 5c3f3f1c85b..fbb789ea596 100644 --- a/extensions/audit/pkg/types/conversion.go +++ b/extensions/audit/pkg/types/conversion.go @@ -234,7 +234,7 @@ func FilesAuditEvent(base AuditEvent, itemid, owner, path string) AuditEventFile // FileUploaded converts a FileUploaded event to an AuditEventFileCreated func FileUploaded(ev events.FileUploaded) AuditEventFileCreated { - iid, path, uid := extractFileDetails(ev.FileID, ev.Owner) + iid, path, uid := extractFileDetails(ev.Ref, ev.Owner) base := BasicAuditEvent(uid, "", MessageFileCreated(iid), ActionFileCreated) return AuditEventFileCreated{ AuditEventFiles: FilesAuditEvent(base, iid, uid, path), @@ -243,7 +243,7 @@ func FileUploaded(ev events.FileUploaded) AuditEventFileCreated { // FileDownloaded converts a FileDownloaded event to an AuditEventFileRead func FileDownloaded(ev events.FileDownloaded) AuditEventFileRead { - iid, path, uid := extractFileDetails(ev.FileID, ev.Owner) + iid, path, uid := extractFileDetails(ev.Ref, ev.Owner) base := BasicAuditEvent(uid, "", MessageFileRead(iid), ActionFileRead) return AuditEventFileRead{ AuditEventFiles: FilesAuditEvent(base, iid, uid, path), @@ -252,7 +252,7 @@ func FileDownloaded(ev events.FileDownloaded) AuditEventFileRead { // ItemMoved converts a ItemMoved event to an AuditEventFileRenamed func ItemMoved(ev events.ItemMoved) AuditEventFileRenamed { - iid, path, uid := extractFileDetails(ev.FileID, ev.Owner) + iid, path, uid := extractFileDetails(ev.Ref, ev.Owner) oldpath := "" if ev.OldReference != nil { @@ -268,7 +268,7 @@ func ItemMoved(ev events.ItemMoved) AuditEventFileRenamed { // ItemTrashed converts a ItemTrashed event to an AuditEventFileDeleted func ItemTrashed(ev events.ItemTrashed) AuditEventFileDeleted { - iid, path, uid := extractFileDetails(ev.FileID, ev.Owner) + iid, path, uid := extractFileDetails(ev.Ref, ev.Owner) base := BasicAuditEvent(uid, "", MessageFileTrashed(iid), ActionFileTrashed) return AuditEventFileDeleted{ AuditEventFiles: FilesAuditEvent(base, iid, uid, path), @@ -277,7 +277,7 @@ func ItemTrashed(ev events.ItemTrashed) AuditEventFileDeleted { // ItemPurged converts a ItemPurged event to an AuditEventFilePurged func ItemPurged(ev events.ItemPurged) AuditEventFilePurged { - iid, path, uid := extractFileDetails(ev.FileID, ev.Owner) + iid, path, uid := extractFileDetails(ev.Ref, ev.Owner) base := BasicAuditEvent(uid, "", MessageFilePurged(iid), ActionFilePurged) return AuditEventFilePurged{ AuditEventFiles: FilesAuditEvent(base, iid, uid, path), @@ -286,7 +286,7 @@ func ItemPurged(ev events.ItemPurged) AuditEventFilePurged { // ItemRestored converts a ItemRestored event to an AuditEventFileRestored func ItemRestored(ev events.ItemRestored) AuditEventFileRestored { - iid, path, uid := extractFileDetails(ev.FileID, ev.Owner) + iid, path, uid := extractFileDetails(ev.Ref, ev.Owner) oldpath := "" if ev.OldReference != nil { @@ -302,7 +302,7 @@ func ItemRestored(ev events.ItemRestored) AuditEventFileRestored { // FileVersionRestored converts a FileVersionRestored event to an AuditEventFileVersionRestored func FileVersionRestored(ev events.FileVersionRestored) AuditEventFileVersionRestored { - iid, path, uid := extractFileDetails(ev.FileID, ev.Owner) + iid, path, uid := extractFileDetails(ev.Ref, ev.Owner) base := BasicAuditEvent(uid, "", MessageFileVersionRestored(iid, ev.Key), ActionFileVersionRestored) return AuditEventFileVersionRestored{ AuditEventFiles: FilesAuditEvent(base, iid, uid, path), From 0db6fae3ad4a48cd1ad1e3a68a0119b52d24f152 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Fri, 29 Apr 2022 15:56:43 +0200 Subject: [PATCH 05/16] update expected failures Signed-off-by: jkoberg --- tests/acceptance/expected-failures-API-on-OCIS-storage.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md index 8fd9fa56977..87bdf5ad1b0 100644 --- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md @@ -1847,10 +1847,6 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers #### [OCS status code zero](https://github.com/owncloud/ocis/issues/3621) - [apiShareManagementToShares/moveReceivedShare.feature:32](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementToShares/moveReceivedShare.feature#L32) -#### [share_with_user_type is not set in response](https://github.com/owncloud/ocis/issues/3622) -- [apiShareManagementBasicToShares/createShareToSharesFolder.feature:37](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementBasicToShares/createShareToSharesFolder.feature#L37) -- [apiShareManagementBasicToShares/createShareToSharesFolder.feature:38](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementBasicToShares/createShareToSharesFolder.feature#L38) - #### [HTTP status code differ while listing the contents of another user's trash bin](https://github.com/owncloud/ocis/issues/3561) - [apiTrashbin/trashbinFilesFolders.feature:199](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiTrashbin/trashbinFilesFolders.feature#L199) - [apiTrashbin/trashbinFilesFolders.feature:223](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiTrashbin/trashbinFilesFolders.feature#L223) From 622e0774da36a0dab82bed5702dc3d0cb947d92b Mon Sep 17 00:00:00 2001 From: jkoberg Date: Fri, 29 Apr 2022 16:01:54 +0200 Subject: [PATCH 06/16] decode href in xml response Signed-off-by: jkoberg --- tests/acceptance/features/bootstrap/SpacesContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index 61d8f20b0d3..82304673c44 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -1145,7 +1145,7 @@ public function findEntryFromPropfindResponse( $results = []; if ($multistatusResults !== null) { foreach ($multistatusResults as $multistatusResult) { - $entryPath = $multistatusResult['value'][0]['value']; + $entryPath = \urldecode($multistatusResult['value'][0]['value']); $entryName = \str_replace($topWebDavPath, "", $entryPath); $entryName = \rawurldecode($entryName); $entryName = \trim($entryName, "/"); From a86cc5ab3a2e1db4913700ff2cd4f6450e58ea33 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Fri, 29 Apr 2022 16:40:44 +0200 Subject: [PATCH 07/16] bump reva again Signed-off-by: jkoberg --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4b11b0bf355..7392fe8e00b 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/blevesearch/bleve/v2 v2.3.2 github.com/coreos/go-oidc/v3 v3.1.0 github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde - github.com/cs3org/reva/v2 v2.0.0-20220429121623-54cc99414f5a + github.com/cs3org/reva/v2 v2.0.0-20220429143817-1cbc34114b5a github.com/disintegration/imaging v1.6.2 github.com/glauth/glauth/v2 v2.0.0-20211021011345-ef3151c28733 github.com/go-chi/chi/v5 v5.0.7 diff --git a/go.sum b/go.sum index a268317a849..20bb1f1165c 100644 --- a/go.sum +++ b/go.sum @@ -318,8 +318,8 @@ github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde h1:WrD9O8ZaWvsm0 github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= github.com/cs3org/reva v1.18.0 h1:MbPS5ZAa8RzKcTxAVeSDdISB3XXqLIxqB03BTN5ReBY= github.com/cs3org/reva v1.18.0/go.mod h1:e5VDUDu4vVWIeVkZcW//n6UZzhGGMa+Tz/whCiX3N6o= -github.com/cs3org/reva/v2 v2.0.0-20220429121623-54cc99414f5a h1:vDUZ74Tq2WvSjTb8Jch7rHJU61LPEDGoKapQ+DQ4Oy8= -github.com/cs3org/reva/v2 v2.0.0-20220429121623-54cc99414f5a/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= +github.com/cs3org/reva/v2 v2.0.0-20220429143817-1cbc34114b5a h1:Uq+iVa+re1qyeva3lEDEHwqkXv9ImeXBP30ke6IYf+U= +github.com/cs3org/reva/v2 v2.0.0-20220429143817-1cbc34114b5a/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= 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 78a6af3af5c2fe954dac97afa2e2309d690cf225 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Fri, 29 Apr 2022 21:31:04 +0200 Subject: [PATCH 08/16] handle resource ids better --- extensions/graph/pkg/service/v0/drives.go | 9 ++++++--- go.mod | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/extensions/graph/pkg/service/v0/drives.go b/extensions/graph/pkg/service/v0/drives.go index 673f246fa57..e41b4253299 100644 --- a/extensions/graph/pkg/service/v0/drives.go +++ b/extensions/graph/pkg/service/v0/drives.go @@ -273,7 +273,8 @@ func (g Graph) UpdateDrive(w http.ResponseWriter, r *http.Request) { identifierParts := strings.Split(driveID, "!") switch len(identifierParts) { case 1: - root.StorageId, root.OpaqueId = identifierParts[0], identifierParts[0] + sID, _ := resourceid.StorageIDUnwrap(identifierParts[0]) + root.StorageId, root.OpaqueId = identifierParts[0], sID case 2: root.StorageId, root.OpaqueId = identifierParts[0], identifierParts[1] default: @@ -492,7 +493,8 @@ func (g Graph) cs3StorageSpaceToDrive(ctx context.Context, baseURL *url.URL, spa } spaceID := space.Root.StorageId - if space.Root.OpaqueId != space.Root.StorageId { + sIDs := resourceid.OwnCloudResourceIDUnwrap(rootID) + if space.Root.OpaqueId != sIDs.OpaqueId { spaceID = rootID } drive := &libregraph.Drive{ @@ -735,9 +737,10 @@ func (g Graph) DeleteDrive(w http.ResponseWriter, r *http.Request) { root := &storageprovider.ResourceId{} identifierParts := strings.Split(driveID, "!") + sID, _ := resourceid.StorageIDUnwrap(identifierParts[0]) switch len(identifierParts) { case 1: - root.StorageId, root.OpaqueId = identifierParts[0], identifierParts[0] + root.StorageId, root.OpaqueId = identifierParts[0], sID case 2: root.StorageId, root.OpaqueId = identifierParts[0], identifierParts[1] default: diff --git a/go.mod b/go.mod index 7392fe8e00b..0a040a20310 100644 --- a/go.mod +++ b/go.mod @@ -274,3 +274,4 @@ require ( // we need to use a fork to make the windows build pass replace github.com/pkg/xattr => github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7 +replace github.com/cs3org/reva/v2 => ../reva From ab71b21fc72aad670038c7bb9273b080e95a8cdf Mon Sep 17 00:00:00 2001 From: David Christofas Date: Fri, 29 Apr 2022 12:16:50 +0200 Subject: [PATCH 09/16] reduce drives in listing of graph /me/drives API --- changelog/unreleased/graph-me-drives.md | 6 +++++ extensions/graph/pkg/service/v0/drives.go | 28 ++++++++++++++++++---- extensions/graph/pkg/service/v0/service.go | 2 +- go.mod | 3 +-- go.sum | 6 +++-- 5 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 changelog/unreleased/graph-me-drives.md diff --git a/changelog/unreleased/graph-me-drives.md b/changelog/unreleased/graph-me-drives.md new file mode 100644 index 00000000000..3104450cd94 --- /dev/null +++ b/changelog/unreleased/graph-me-drives.md @@ -0,0 +1,6 @@ +Change: Reduce drives in graph /me/drives API + +Reduced the drives in the graph `/me/drives` API to only the drives the user has access to. +The endpoint `/drives` will list all drives when the user has the permission. + +https://github.com/owncloud/ocis/pull/3629 diff --git a/extensions/graph/pkg/service/v0/drives.go b/extensions/graph/pkg/service/v0/drives.go index e41b4253299..17f04e2df7c 100644 --- a/extensions/graph/pkg/service/v0/drives.go +++ b/extensions/graph/pkg/service/v0/drives.go @@ -31,8 +31,19 @@ import ( merrors "go-micro.dev/v4/errors" ) -// GetDrives implements the Service interface. +// GetDrives lists all drives the current user has access to func (g Graph) GetDrives(w http.ResponseWriter, r *http.Request) { + g.getDrives(w, r, false) +} + +// GetAllDrives lists all drives, including other user's drives, if the current +// user has the permission. +func (g Graph) GetAllDrives(w http.ResponseWriter, r *http.Request) { + g.getDrives(w, r, true) +} + +// getDrives implements the Service interface. +func (g Graph) getDrives(w http.ResponseWriter, r *http.Request, unrestricted bool) { sanitizedPath := strings.TrimPrefix(r.URL.Path, "/graph/v1.0/") // Parse the request with odata parser odataReq, err := godata.ParseRequest(r.Context(), sanitizedPath, r.URL.Query()) @@ -41,7 +52,10 @@ func (g Graph) GetDrives(w http.ResponseWriter, r *http.Request) { errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, err.Error()) return } - g.logger.Info().Interface("query", r.URL.Query()).Msg("Calling GetDrives") + g.logger.Debug(). + Interface("query", r.URL.Query()). + Bool("unrestricted", unrestricted). + Msg("Calling getDrives") ctx := r.Context() filters, err := generateCs3Filters(odataReq) @@ -50,7 +64,7 @@ func (g Graph) GetDrives(w http.ResponseWriter, r *http.Request) { errorcode.NotSupported.Render(w, r, http.StatusNotImplemented, err.Error()) return } - res, err := g.ListStorageSpacesWithFilters(ctx, filters) + res, err := g.ListStorageSpacesWithFilters(ctx, filters, unrestricted) switch { case err != nil: g.logger.Error().Err(err).Msg(ListStorageSpacesTransportErr) @@ -106,7 +120,7 @@ func (g Graph) GetSingleDrive(w http.ResponseWriter, r *http.Request) { ctx := r.Context() filters := []*storageprovider.ListStorageSpacesRequest_Filter{listStorageSpacesIDFilter(driveID)} - res, err := g.ListStorageSpacesWithFilters(ctx, filters) + res, err := g.ListStorageSpacesWithFilters(ctx, filters, true) switch { case err != nil: g.logger.Error().Err(err).Msg(ListStorageSpacesTransportErr) @@ -399,7 +413,7 @@ func (g Graph) formatDrives(ctx context.Context, baseURL *url.URL, storageSpaces } // ListStorageSpacesWithFilters List Storage Spaces using filters -func (g Graph) ListStorageSpacesWithFilters(ctx context.Context, filters []*storageprovider.ListStorageSpacesRequest_Filter) (*storageprovider.ListStorageSpacesResponse, error) { +func (g Graph) ListStorageSpacesWithFilters(ctx context.Context, filters []*storageprovider.ListStorageSpacesRequest_Filter, unrestricted bool) (*storageprovider.ListStorageSpacesResponse, error) { client := g.GetGatewayClient() permissions := make(map[string]struct{}, 1) @@ -424,6 +438,10 @@ func (g Graph) ListStorageSpacesWithFilters(ctx context.Context, filters []*stor Decoder: "json", Value: value, }, + "unrestricted": { + Decoder: "plain", + Value: []byte(strconv.FormatBool(unrestricted)), + }, }}, Filters: filters, }) diff --git a/extensions/graph/pkg/service/v0/service.go b/extensions/graph/pkg/service/v0/service.go index 599a558f3b3..c198834716e 100644 --- a/extensions/graph/pkg/service/v0/service.go +++ b/extensions/graph/pkg/service/v0/service.go @@ -173,7 +173,7 @@ func NewService(opts ...Option) Service { account.JWTSecret(options.Config.TokenManager.JWTSecret)), ) r.Route("/drives", func(r chi.Router) { - r.Get("/", svc.GetDrives) + r.Get("/", svc.GetAllDrives) r.Post("/", svc.CreateDrive) r.Route("/{driveID}", func(r chi.Router) { r.Patch("/", svc.UpdateDrive) diff --git a/go.mod b/go.mod index 0a040a20310..9f6f0524434 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/blevesearch/bleve/v2 v2.3.2 github.com/coreos/go-oidc/v3 v3.1.0 github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde - github.com/cs3org/reva/v2 v2.0.0-20220429143817-1cbc34114b5a + github.com/cs3org/reva/v2 v2.0.0-20220429105953-71d0c17a5e8f github.com/disintegration/imaging v1.6.2 github.com/glauth/glauth/v2 v2.0.0-20211021011345-ef3151c28733 github.com/go-chi/chi/v5 v5.0.7 @@ -274,4 +274,3 @@ require ( // we need to use a fork to make the windows build pass replace github.com/pkg/xattr => github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7 -replace github.com/cs3org/reva/v2 => ../reva diff --git a/go.sum b/go.sum index 20bb1f1165c..ddc2ff673bc 100644 --- a/go.sum +++ b/go.sum @@ -236,6 +236,8 @@ github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBW github.com/boombuler/barcode v1.0.1 h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyXcs= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/c-bata/go-prompt v0.2.5/go.mod h1:vFnjEGDIIA/Lib7giyE4E9c50Lvl8j0S+7FVlAwDAVw= +github.com/c0rby/reva/v2 v2.0.0-20220429095703-bbac276f2cb4 h1:NAAz/6zTxFa0RBui856DKPIi4cF5jU7FHcbX+n25DM0= +github.com/c0rby/reva/v2 v2.0.0-20220429095703-bbac276f2cb4/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -318,8 +320,8 @@ github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde h1:WrD9O8ZaWvsm0 github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= github.com/cs3org/reva v1.18.0 h1:MbPS5ZAa8RzKcTxAVeSDdISB3XXqLIxqB03BTN5ReBY= github.com/cs3org/reva v1.18.0/go.mod h1:e5VDUDu4vVWIeVkZcW//n6UZzhGGMa+Tz/whCiX3N6o= -github.com/cs3org/reva/v2 v2.0.0-20220429143817-1cbc34114b5a h1:Uq+iVa+re1qyeva3lEDEHwqkXv9ImeXBP30ke6IYf+U= -github.com/cs3org/reva/v2 v2.0.0-20220429143817-1cbc34114b5a/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= +github.com/cs3org/reva/v2 v2.0.0-20220429105953-71d0c17a5e8f h1:UH9T67KTeWfKCmUQcR8jNSPDSoXaEjS6zkFykILO13w= +github.com/cs3org/reva/v2 v2.0.0-20220429105953-71d0c17a5e8f/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= 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 5b0988f307fc2fa36de79f835b8ca1a7cc92404c Mon Sep 17 00:00:00 2001 From: David Christofas Date: Fri, 29 Apr 2022 15:35:00 +0200 Subject: [PATCH 10/16] fix local api test URL decode href before comparing with a given string --- tests/acceptance/features/bootstrap/SpacesContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index 82304673c44..a31f5666b43 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -349,7 +349,7 @@ public function cleanDataAfterTests(): void /** * The method first disables and then deletes spaces * @param string $driveType - * + * * @return void * * @throws Exception From c3511c71ac42dca31cdfab68fd271e4f5c9e2ec2 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Fri, 29 Apr 2022 22:22:41 +0200 Subject: [PATCH 11/16] adapt spaces context --- .../features/bootstrap/SpacesContext.php | 65 ++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index a31f5666b43..5f9c23357d0 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -220,6 +220,24 @@ public function getSpaceByName(string $user, string $spaceName): array { return $spaces[$spaceName]; } + /** + * The method finds available spaces to the manager user and returns the space by spaceName + * + * @param string $user + * @param string $spaceName + * + * @return array + */ + public function getSpaceByNameManager(string $user, string $spaceName): array { + $this->theUserListsAllAvailableSpacesUsingTheGraphApi($user); + + $spaces = $this->getAvailableSpaces(); + Assert::assertIsArray($spaces[$spaceName], "Space with name $spaceName for user $user not found"); + Assert::assertNotEmpty($spaces[$spaceName]["root"]["webDavUrl"], "WebDavUrl for space with name $spaceName for user $user not found"); + + return $spaces[$spaceName]; + } + /** * The method finds file by fileName and spaceName and returns data of file wich contains in responseHeader * fileName contains the path, if the file is in the folder @@ -410,6 +428,33 @@ public function listMySpacesRequest( return HttpRequestHelper::get($fullUrl, $xRequestId, $user, $password, $headers, $body); } + /** + * Send Graph List All Spaces Request + * + * @param string $user + * @param string $password + * @param string $urlArguments + * @param string $xRequestId + * @param array $body + * @param array $headers + * + * @return ResponseInterface + * + * @throws GuzzleException + */ + public function listAllSpacesRequest( + string $user, + string $password, + string $urlArguments = '', + string $xRequestId = '', + array $body = [], + array $headers = [] + ): ResponseInterface { + $fullUrl = $this->baseUrl . "/graph/v1.0/drives/" . $urlArguments; + + return HttpRequestHelper::get($fullUrl, $xRequestId, $user, $password, $headers, $body); + } + /** * Send Graph List Single Space Request * @@ -530,6 +575,24 @@ public function theUserListsAllHisAvailableSpacesUsingTheGraphApi(string $user): $this->rememberTheAvailableSpaces(); } + /** + * + * @param string $user + * + * @return void + * + * @throws GuzzleException + */ + public function theUserListsAllAvailableSpacesUsingTheGraphApi(string $user): void { + $this->featureContext->setResponse( + $this->listAllSpacesRequest( + $user, + $this->featureContext->getPasswordForUser($user) + ) + ); + $this->rememberTheAvailableSpaces(); + } + /** * @When /^user "([^"]*)" lists all available spaces via the GraphApi with query "([^"]*)"$/ * @@ -1951,7 +2014,7 @@ public function sendRestoreSpaceRequest( string $userWithManagerRights = '' ): void { if (!empty($userWithManagerRights)) { - $space = $this->getSpaceByName($userWithManagerRights, $spaceName); + $space = $this->getSpaceByNameManager($userWithManagerRights, $spaceName); } else { $space = $this->getSpaceByName($user, $spaceName); } From 7245c354ca7b299e92155b40a282aefd2902a9da Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Sat, 30 Apr 2022 13:23:21 +0200 Subject: [PATCH 12/16] omit opaque id correctly --- extensions/graph/pkg/service/v0/drives.go | 25 +++++++++++++------ extensions/graph/pkg/service/v0/graph_test.go | 8 +++--- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/extensions/graph/pkg/service/v0/drives.go b/extensions/graph/pkg/service/v0/drives.go index 17f04e2df7c..821e664898e 100644 --- a/extensions/graph/pkg/service/v0/drives.go +++ b/extensions/graph/pkg/service/v0/drives.go @@ -448,11 +448,25 @@ func (g Graph) ListStorageSpacesWithFilters(ctx context.Context, filters []*stor return res, err } +func generateSpaceId(id *storageprovider.ResourceId) (spaceID string) { + spaceID = id.GetStorageId() + // 2nd ID to compare is the opaque ID of the Space Root + spaceID2 := id.GetOpaqueId() + if strings.Contains(spaceID, "$") { + spaceID2, _ = resourceid.StorageIDUnwrap(spaceID) + } + // Append opaqueID only if it is different from the spaceID2 + if id.OpaqueId != spaceID2 { + spaceID += "!" + id.OpaqueId + } + return spaceID +} + func (g Graph) cs3StorageSpaceToDrive(ctx context.Context, baseURL *url.URL, space *storageprovider.StorageSpace) (*libregraph.Drive, error) { if space.Root == nil { return nil, fmt.Errorf("space has no root") } - rootID := resourceid.OwnCloudResourceIDWrap(space.Root) + spaceID := generateSpaceId(space.Root) var permissions []libregraph.Permission if space.Opaque != nil { @@ -510,19 +524,14 @@ func (g Graph) cs3StorageSpaceToDrive(ctx context.Context, baseURL *url.URL, spa } } - spaceID := space.Root.StorageId - sIDs := resourceid.OwnCloudResourceIDUnwrap(rootID) - if space.Root.OpaqueId != sIDs.OpaqueId { - spaceID = rootID - } drive := &libregraph.Drive{ - Id: &spaceID, + Id: libregraph.PtrString(spaceID), Name: &space.Name, //"createdDateTime": "string (timestamp)", // TODO read from StorageSpace ... needs Opaque for now //"description": "string", // TODO read from StorageSpace ... needs Opaque for now DriveType: &space.SpaceType, Root: &libregraph.DriveItem{ - Id: &rootID, + Id: libregraph.PtrString(resourceid.OwnCloudResourceIDWrap(space.Root)), Permissions: permissions, }, } diff --git a/extensions/graph/pkg/service/v0/graph_test.go b/extensions/graph/pkg/service/v0/graph_test.go index 0d52357cf8a..8ad28656ee2 100644 --- a/extensions/graph/pkg/service/v0/graph_test.go +++ b/extensions/graph/pkg/service/v0/graph_test.go @@ -201,7 +201,7 @@ var _ = Describe("Graph", func() { Id: &provider.StorageSpaceId{OpaqueId: "aID!differentID"}, SpaceType: "mountpoint", Root: &provider.ResourceId{ - StorageId: "aID", + StorageId: "prID$aID", OpaqueId: "differentID", }, Name: "New Folder", @@ -246,11 +246,11 @@ var _ = Describe("Graph", func() { value := response["value"][0] Expect(*value.DriveAlias).To(Equal("mountpoint/new-folder")) Expect(*value.DriveType).To(Equal("mountpoint")) - Expect(*value.Id).To(Equal("aID!differentID")) + Expect(*value.Id).To(Equal("prID$aID!differentID")) Expect(*value.Name).To(Equal("New Folder")) - Expect(*value.Root.WebDavUrl).To(Equal("https://localhost:9200/dav/spaces/aID!differentID")) + Expect(*value.Root.WebDavUrl).To(Equal("https://localhost:9200/dav/spaces/prID$aID!differentID")) Expect(*value.Root.ETag).To(Equal("101112131415")) - Expect(*value.Root.Id).To(Equal("aID!differentID")) + Expect(*value.Root.Id).To(Equal("prID$aID!differentID")) Expect(*value.Root.RemoteItem.ETag).To(Equal("123456789")) Expect(*value.Root.RemoteItem.Id).To(Equal("ownerStorageID!opaqueID")) Expect(value.Root.RemoteItem.LastModifiedDateTime.UTC()).To(Equal(time.Unix(1648327606, 0).UTC())) From b629aa6b6df835b8473baed070b079185c6da93f Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Sat, 30 Apr 2022 20:45:00 +0200 Subject: [PATCH 13/16] use reva replace --- go.mod | 2 ++ go.sum | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 9f6f0524434..96753255df8 100644 --- a/go.mod +++ b/go.mod @@ -274,3 +274,5 @@ require ( // we need to use a fork to make the windows build pass replace github.com/pkg/xattr => github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7 + +replace github.com/cs3org/reva/v2 => github.com/micbar/reva/v2 v2.0.0-20220430184241-9ffcd414f24d diff --git a/go.sum b/go.sum index ddc2ff673bc..5f741103a8f 100644 --- a/go.sum +++ b/go.sum @@ -236,8 +236,6 @@ github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBW github.com/boombuler/barcode v1.0.1 h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyXcs= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/c-bata/go-prompt v0.2.5/go.mod h1:vFnjEGDIIA/Lib7giyE4E9c50Lvl8j0S+7FVlAwDAVw= -github.com/c0rby/reva/v2 v2.0.0-20220429095703-bbac276f2cb4 h1:NAAz/6zTxFa0RBui856DKPIi4cF5jU7FHcbX+n25DM0= -github.com/c0rby/reva/v2 v2.0.0-20220429095703-bbac276f2cb4/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -320,8 +318,6 @@ github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde h1:WrD9O8ZaWvsm0 github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= github.com/cs3org/reva v1.18.0 h1:MbPS5ZAa8RzKcTxAVeSDdISB3XXqLIxqB03BTN5ReBY= github.com/cs3org/reva v1.18.0/go.mod h1:e5VDUDu4vVWIeVkZcW//n6UZzhGGMa+Tz/whCiX3N6o= -github.com/cs3org/reva/v2 v2.0.0-20220429105953-71d0c17a5e8f h1:UH9T67KTeWfKCmUQcR8jNSPDSoXaEjS6zkFykILO13w= -github.com/cs3org/reva/v2 v2.0.0-20220429105953-71d0c17a5e8f/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= 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= @@ -1018,6 +1014,8 @@ github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103 h1:Z/i1e+gTZrmcGeZy github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103/go.mod h1:o9YPB5aGP8ob35Vy6+vyq3P3bWe7NQWzf+JLiXCiMaE= github.com/mennanov/fieldmask-utils v0.5.0 h1:8em4akN0NM3hmmrg8VbvOPfdS4SSBdbFd53m9VtfOg0= github.com/mennanov/fieldmask-utils v0.5.0/go.mod h1:lah2lHczE2ff+7SqnNKpB+YzaO7M3h5iNO4LgPTJheM= +github.com/micbar/reva/v2 v2.0.0-20220430184241-9ffcd414f24d h1:U707T1GTA0DDhBuqSHXYnI4Lzk823pzkWEycknYSLpo= +github.com/micbar/reva/v2 v2.0.0-20220430184241-9ffcd414f24d/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7 h1:M0R40eUlyqxMuZn3Knx4DJTwHE3TiPFzcWUA/BKtDMM= github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7/go.mod h1:sBD3RAqlr8Q+RC3FutZcikpT8nyDrIEEBw2J744gVWs= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= From 1e1016abea18fa9a004d074204939eba7e7a3edb Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Sat, 30 Apr 2022 23:08:29 +0200 Subject: [PATCH 14/16] adapt expected failures --- .../acceptance/expected-failures-graphAPI-on-OCIS-storage.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/acceptance/expected-failures-graphAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-graphAPI-on-OCIS-storage.md index 85c610d51c3..f513a93f0a1 100644 --- a/tests/acceptance/expected-failures-graphAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-graphAPI-on-OCIS-storage.md @@ -1639,10 +1639,6 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers #### [OCS status code zero](https://github.com/owncloud/ocis/issues/3621) - [apiShareManagementToShares/moveReceivedShare.feature:32](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementToShares/moveReceivedShare.feature#L32) -#### [share_with_user_type is not set in response](https://github.com/owncloud/ocis/issues/3622) -- [apiShareManagementBasicToShares/createShareToSharesFolder.feature:37](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementBasicToShares/createShareToSharesFolder.feature#L37) -- [apiShareManagementBasicToShares/createShareToSharesFolder.feature:38](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementBasicToShares/createShareToSharesFolder.feature#L38) - #### [HTTP status code differ while listing the contents of another user's trash bin](https://github.com/owncloud/ocis/issues/3561) - [apiTrashbin/trashbinFilesFolders.feature:199](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiTrashbin/trashbinFilesFolders.feature#L199) - [apiTrashbin/trashbinFilesFolders.feature:223](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiTrashbin/trashbinFilesFolders.feature#L223) From d74e3d168b5d12d622a054d6ba58314a2d4b0b56 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Sun, 1 May 2022 10:26:47 +0200 Subject: [PATCH 15/16] use reva version with no concurrent share listing --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 96753255df8..74d5a162849 100644 --- a/go.mod +++ b/go.mod @@ -275,4 +275,4 @@ require ( // we need to use a fork to make the windows build pass replace github.com/pkg/xattr => github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7 -replace github.com/cs3org/reva/v2 => github.com/micbar/reva/v2 v2.0.0-20220430184241-9ffcd414f24d +replace github.com/cs3org/reva/v2 => github.com/micbar/reva/v2 v2.0.0-20220430214110-c6ef0c907aea diff --git a/go.sum b/go.sum index 5f741103a8f..f34b6c4fc0f 100644 --- a/go.sum +++ b/go.sum @@ -1014,8 +1014,8 @@ github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103 h1:Z/i1e+gTZrmcGeZy github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103/go.mod h1:o9YPB5aGP8ob35Vy6+vyq3P3bWe7NQWzf+JLiXCiMaE= github.com/mennanov/fieldmask-utils v0.5.0 h1:8em4akN0NM3hmmrg8VbvOPfdS4SSBdbFd53m9VtfOg0= github.com/mennanov/fieldmask-utils v0.5.0/go.mod h1:lah2lHczE2ff+7SqnNKpB+YzaO7M3h5iNO4LgPTJheM= -github.com/micbar/reva/v2 v2.0.0-20220430184241-9ffcd414f24d h1:U707T1GTA0DDhBuqSHXYnI4Lzk823pzkWEycknYSLpo= -github.com/micbar/reva/v2 v2.0.0-20220430184241-9ffcd414f24d/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= +github.com/micbar/reva/v2 v2.0.0-20220430214110-c6ef0c907aea h1:4B/g4AQybc33pRM44R1gdF4Rg8HTsLI1cok7W9+XPTw= +github.com/micbar/reva/v2 v2.0.0-20220430214110-c6ef0c907aea/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7 h1:M0R40eUlyqxMuZn3Knx4DJTwHE3TiPFzcWUA/BKtDMM= github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7/go.mod h1:sBD3RAqlr8Q+RC3FutZcikpT8nyDrIEEBw2J744gVWs= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= From 469fc3d4c5eb738dcbbaff1b519dd4815e62565f Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Mon, 2 May 2022 09:59:29 +0200 Subject: [PATCH 16/16] update reva to latest edge --- go.mod | 4 +--- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 74d5a162849..90185fb87ae 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/blevesearch/bleve/v2 v2.3.2 github.com/coreos/go-oidc/v3 v3.1.0 github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde - github.com/cs3org/reva/v2 v2.0.0-20220429105953-71d0c17a5e8f + github.com/cs3org/reva/v2 v2.0.0-20220502075009-8bcec2e4663e github.com/disintegration/imaging v1.6.2 github.com/glauth/glauth/v2 v2.0.0-20211021011345-ef3151c28733 github.com/go-chi/chi/v5 v5.0.7 @@ -274,5 +274,3 @@ require ( // we need to use a fork to make the windows build pass replace github.com/pkg/xattr => github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7 - -replace github.com/cs3org/reva/v2 => github.com/micbar/reva/v2 v2.0.0-20220430214110-c6ef0c907aea diff --git a/go.sum b/go.sum index f34b6c4fc0f..2ee58f6e4f1 100644 --- a/go.sum +++ b/go.sum @@ -318,6 +318,8 @@ github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde h1:WrD9O8ZaWvsm0 github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= github.com/cs3org/reva v1.18.0 h1:MbPS5ZAa8RzKcTxAVeSDdISB3XXqLIxqB03BTN5ReBY= github.com/cs3org/reva v1.18.0/go.mod h1:e5VDUDu4vVWIeVkZcW//n6UZzhGGMa+Tz/whCiX3N6o= +github.com/cs3org/reva/v2 v2.0.0-20220502075009-8bcec2e4663e h1:ym80MMvfFLHMxt6aiU67kTe/pzRBaSOUNdPkmeKYejk= +github.com/cs3org/reva/v2 v2.0.0-20220502075009-8bcec2e4663e/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= 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= @@ -1014,8 +1016,6 @@ github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103 h1:Z/i1e+gTZrmcGeZy github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103/go.mod h1:o9YPB5aGP8ob35Vy6+vyq3P3bWe7NQWzf+JLiXCiMaE= github.com/mennanov/fieldmask-utils v0.5.0 h1:8em4akN0NM3hmmrg8VbvOPfdS4SSBdbFd53m9VtfOg0= github.com/mennanov/fieldmask-utils v0.5.0/go.mod h1:lah2lHczE2ff+7SqnNKpB+YzaO7M3h5iNO4LgPTJheM= -github.com/micbar/reva/v2 v2.0.0-20220430214110-c6ef0c907aea h1:4B/g4AQybc33pRM44R1gdF4Rg8HTsLI1cok7W9+XPTw= -github.com/micbar/reva/v2 v2.0.0-20220430214110-c6ef0c907aea/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7 h1:M0R40eUlyqxMuZn3Knx4DJTwHE3TiPFzcWUA/BKtDMM= github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7/go.mod h1:sBD3RAqlr8Q+RC3FutZcikpT8nyDrIEEBw2J744gVWs= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=