diff --git a/changelog/unreleased/bump-reva-for-unnecessary-grant-exists-check.md b/changelog/unreleased/bump-reva-for-unnecessary-grant-exists-check.md new file mode 100644 index 0000000000..db1a6ebbf0 --- /dev/null +++ b/changelog/unreleased/bump-reva-for-unnecessary-grant-exists-check.md @@ -0,0 +1,5 @@ +Enhancement: bump reva + +We have bumped reva to drop the unnecessary grants exists check when creating shares. + +https://github.com/owncloud/ocis/pull/8502 diff --git a/changelog/unreleased/bump-reva.md b/changelog/unreleased/bump-reva.md new file mode 100644 index 0000000000..15721e1b0b --- /dev/null +++ b/changelog/unreleased/bump-reva.md @@ -0,0 +1,52 @@ +Enhancement: Update reva to 2.19.0 + +We update reva to the version 2.19.0 + +* Bugfix [cs3org/reva#4464](https://github.com/cs3org/reva/pull/4464): Don't check lock grants +* Bugfix [cs3org/reva#4516](https://github.com/cs3org/reva/pull/4516): The sharemanager can now reject grants with resharing permissions +* Bugfix [cs3org/reva#4512](https://github.com/cs3org/reva/pull/4512): Bump dependencies +* Bugfix [cs3org/reva#4481](https://github.com/cs3org/reva/pull/4481): Distinguish failure and node metadata reversal +* Bugfix [cs3org/reva#4456](https://github.com/cs3org/reva/pull/4456): Do not lose revisions when restoring the first revision +* Bugfix [cs3org/reva#4472](https://github.com/cs3org/reva/pull/4472): Fix concurrent access to a map +* Bugfix [cs3org/reva#4457](https://github.com/cs3org/reva/pull/4457): Fix concurrent map access in sharecache +* Bugfix [cs3org/reva#4498](https://github.com/cs3org/reva/pull/4498): Fix Content-Disposition header in dav +* Bugfix [cs3org/reva#4461](https://github.com/cs3org/reva/pull/4461): CORS handling for WebDAV requests fixed +* Bugfix [cs3org/reva#4462](https://github.com/cs3org/reva/pull/4462): Prevent setting container specific permissions on files +* Bugfix [cs3org/reva#4479](https://github.com/cs3org/reva/pull/4479): Fix creating documents in the app provider +* Bugfix [cs3org/reva#4474](https://github.com/cs3org/reva/pull/4474): Make /dav/meta consistent +* Bugfix [cs3org/reva#4446](https://github.com/cs3org/reva/pull/4446): Disallow to delete a file during the processing +* Bugfix [cs3org/reva#4517](https://github.com/cs3org/reva/pull/4517): Fix duplicated items in the sharejail root +* Bugfix [cs3org/reva#4473](https://github.com/cs3org/reva/pull/4473): Decomposedfs now correctly lists sessions +* Bugfix [cs3org/reva#4528](https://github.com/cs3org/reva/pull/4528): Respect IfNotExist option when uploading in cs3 metadata storage +* Bugfix [cs3org/reva#4503](https://github.com/cs3org/reva/pull/4503): Fix an error when move +* Bugfix [cs3org/reva#4466](https://github.com/cs3org/reva/pull/4466): Fix natsjskv store +* Bugfix [cs3org/reva#4533](https://github.com/cs3org/reva/pull/4533): Fix recursive trashcan purge +* Bugfix [cs3org/reva#4492](https://github.com/cs3org/reva/pull/4492): Fix the resource name +* Bugfix [cs3org/reva#4463](https://github.com/cs3org/reva/pull/4463): Fix the resource name +* Bugfix [cs3org/reva#4448](https://github.com/cs3org/reva/pull/4448): Fix truncating existing files +* Bugfix [cs3org/reva#4434](https://github.com/cs3org/reva/pull/4434): Fix the upload postprocessing +* Bugfix [cs3org/reva#4469](https://github.com/cs3org/reva/pull/4469): Handle interrupted uploads +* Bugfix [cs3org/reva#4532](https://github.com/cs3org/reva/pull/4532): Jsoncs3 cache fixes +* Bugfix [cs3org/reva#4449](https://github.com/cs3org/reva/pull/4449): Keep failed processing status +* Bugfix [cs3org/reva#4529](https://github.com/cs3org/reva/pull/4529): We aligned some OCS return codes with oc10 +* Bugfix [cs3org/reva#4507](https://github.com/cs3org/reva/pull/4507): Make tusd CORS headers configurable +* Bugfix [cs3org/reva#4452](https://github.com/cs3org/reva/pull/4452): More efficient share jail +* Bugfix [cs3org/reva#4476](https://github.com/cs3org/reva/pull/4476): No need to unmark postprocessing when it was not started +* Bugfix [cs3org/reva#4454](https://github.com/cs3org/reva/pull/4454): Skip unnecessary share retrieval +* Bugfix [cs3org/reva#4527](https://github.com/cs3org/reva/pull/4527): Unify datagateway method handling +* Bugfix [cs3org/reva#4530](https://github.com/cs3org/reva/pull/4530): Drop unnecessary grant exists check +* Bugfix [cs3org/reva#4475](https://github.com/cs3org/reva/pull/4475): Upload session specific processing flag +* Enhancement [cs3org/reva#4501](https://github.com/cs3org/reva/pull/4501): Allow sending multiple user ids in one sse event +* Enhancement [cs3org/reva#4485](https://github.com/cs3org/reva/pull/4485): Modify the concurrency default +* Enhancement [cs3org/reva#4526](https://github.com/cs3org/reva/pull/4526): Configurable s3 put options +* Enhancement [cs3org/reva#4453](https://github.com/cs3org/reva/pull/4453): Disable the password policy +* Enhancement [cs3org/reva#4477](https://github.com/cs3org/reva/pull/4477): Extend ResumePostprocessing event +* Enhancement [cs3org/reva#4491](https://github.com/cs3org/reva/pull/4491): Add filename incrementor for secret filedrops +* Enhancement [cs3org/reva#4490](https://github.com/cs3org/reva/pull/4490): Lazy initialize public share manager +* Enhancement [cs3org/reva#4494](https://github.com/cs3org/reva/pull/4494): Start implementation of a plain posix storage driver +* Enhancement [cs3org/reva#4502](https://github.com/cs3org/reva/pull/4502): Add spaceindex.AddAll() + +https://github.com/owncloud/ocis/pull/8519 +https://github.com/owncloud/ocis/pull/8502 +https://github.com/owncloud/ocis/pull/8340 +https://github.com/owncloud/ocis/pull/8381 diff --git a/changelog/unreleased/deprecate-sharing-cs3-backends.md b/changelog/unreleased/deprecate-sharing-cs3-backends.md new file mode 100644 index 0000000000..d9e3e63c35 --- /dev/null +++ b/changelog/unreleased/deprecate-sharing-cs3-backends.md @@ -0,0 +1,5 @@ +Change: Deprecate sharing cs3 backends + +The `cs3` user and public sharing drivers have already been replaced by `jsoncs3`. We now mark them as deprecated in preparation to kill a lot of unused code in reva. + +https://github.com/owncloud/ocis/pull/8478 diff --git a/changelog/unreleased/fix-recursive-trashcan-purge.md b/changelog/unreleased/fix-recursive-trashcan-purge.md new file mode 100644 index 0000000000..72289d775a --- /dev/null +++ b/changelog/unreleased/fix-recursive-trashcan-purge.md @@ -0,0 +1,7 @@ +Bugfix: Bump reva to pull in changes to fix recursive trashcan purge + +We have fixed a bug in the trashcan purge process that did not delete folder structures recursively. + +https://github.com/owncloud/ocis/pull/8505 +https://github.com/owncloud/ocis/issues/8473 +https://github.com/cs3org/reva/pull/4533 diff --git a/changelog/unreleased/sharing-ng-driveitemid.md b/changelog/unreleased/sharing-ng-driveitemid.md new file mode 100644 index 0000000000..baacd31f4e --- /dev/null +++ b/changelog/unreleased/sharing-ng-driveitemid.md @@ -0,0 +1,9 @@ +Bugfix: graph/sharedWithMe align IDs with webdav response + +The IDs of the driveItems returned by the 'graph/v1beta1/me/drive/sharedWithMe' +endpoint are now aligned with the IDs returned in the PROPFIND response +of the webdav service. + +https://github.com/owncloud/ocis/pull/8467 +https://github.com/owncloud/ocis/issues/8420 +https://github.com/owncloud/ocis/issues/8080 diff --git a/deployments/continuous-deployment-config/ocis_keycloak/latest.yml b/deployments/continuous-deployment-config/ocis_keycloak/latest.yml index 7f2e605dc4..3f153ed9cb 100644 --- a/deployments/continuous-deployment-config/ocis_keycloak/latest.yml +++ b/deployments/continuous-deployment-config/ocis_keycloak/latest.yml @@ -2,12 +2,12 @@ - name: continuous-deployment-ocis-keycloak-latest server: server_type: cx21 - image: ubuntu-20.04 + image: ubuntu-22.04 location: nbg1 initial_ssh_key_names: - owncloud-ocis@drone.owncloud.com labels: - owner: wkloucek + owner: ocis-team for: oCIS-continuous-deployment-examples rebuild: $REBUILD rebuild_carry_paths: @@ -31,7 +31,7 @@ docker_compose_path: deployments/examples/ocis_keycloak env: INSECURE: "false" - TRAEFIK_ACME_MAIL: wkloucek@owncloud.com + TRAEFIK_ACME_MAIL: mbarz@owncloud.com OCIS_DOCKER_TAG: latest OCIS_DOMAIN: ocis.ocis-keycloak.latest.owncloud.works KEYCLOAK_DOMAIN: keycloak.ocis-keycloak.latest.owncloud.works diff --git a/deployments/continuous-deployment-config/ocis_keycloak/released.yml b/deployments/continuous-deployment-config/ocis_keycloak/released.yml index 7b47456729..1f8705a07f 100644 --- a/deployments/continuous-deployment-config/ocis_keycloak/released.yml +++ b/deployments/continuous-deployment-config/ocis_keycloak/released.yml @@ -2,12 +2,12 @@ - name: continuous-deployment-ocis-keycloak-released server: server_type: cx21 - image: ubuntu-20.04 + image: ubuntu-22.04 location: nbg1 initial_ssh_key_names: - owncloud-ocis@drone.owncloud.com labels: - owner: wkloucek + owner: ocis-team for: oCIS-continuous-deployment-examples rebuild: $REBUILD rebuild_carry_paths: @@ -31,8 +31,8 @@ docker_compose_path: deployments/examples/ocis_keycloak env: INSECURE: "false" - TRAEFIK_ACME_MAIL: wkloucek@owncloud.com - OCIS_DOCKER_TAG: 4.0.0 + TRAEFIK_ACME_MAIL: mbarz@owncloud.com + OCIS_DOCKER_TAG: 4.0.6 OCIS_DOMAIN: ocis.ocis-keycloak.released.owncloud.works KEYCLOAK_DOMAIN: keycloak.ocis-keycloak.released.owncloud.works COMPOSE_FILE: docker-compose.yml:monitoring_tracing/docker-compose-additions.yml diff --git a/deployments/continuous-deployment-config/ocis_ldap/latest.yml b/deployments/continuous-deployment-config/ocis_ldap/latest.yml index 38df065132..a103621bc2 100644 --- a/deployments/continuous-deployment-config/ocis_ldap/latest.yml +++ b/deployments/continuous-deployment-config/ocis_ldap/latest.yml @@ -2,12 +2,12 @@ - name: continuous-deployment-ocis-ldap-latest server: server_type: cx21 - image: ubuntu-20.04 + image: ubuntu-22.04 location: nbg1 initial_ssh_key_names: - owncloud-ocis@drone.owncloud.com labels: - owner: wkloucek + owner: ocis-team for: oCIS-continuous-deployment-examples rebuild: $REBUILD rebuild_carry_paths: @@ -31,7 +31,7 @@ docker_compose_path: deployments/examples/ocis_ldap env: INSECURE: "false" - TRAEFIK_ACME_MAIL: wkloucek@owncloud.com + TRAEFIK_ACME_MAIL: mbarz@owncloud.com OCIS_DOCKER_TAG: latest OCIS_DOMAIN: ocis.ocis-ldap.latest.owncloud.works LDAP_MANAGER_DOMAIN: ldap.ocis-ldap.latest.owncloud.works diff --git a/deployments/continuous-deployment-config/ocis_ldap/released.yml b/deployments/continuous-deployment-config/ocis_ldap/released.yml index abba2b35f3..00a4a95064 100644 --- a/deployments/continuous-deployment-config/ocis_ldap/released.yml +++ b/deployments/continuous-deployment-config/ocis_ldap/released.yml @@ -2,12 +2,12 @@ - name: continuous-deployment-ocis-ldap-released server: server_type: cx21 - image: ubuntu-20.04 + image: ubuntu-22.04 location: nbg1 initial_ssh_key_names: - owncloud-ocis@drone.owncloud.com labels: - owner: wkloucek + owner: ocis-team for: oCIS-continuous-deployment-examples rebuild: $REBUILD rebuild_carry_paths: @@ -31,8 +31,8 @@ docker_compose_path: deployments/examples/ocis_ldap env: INSECURE: "false" - TRAEFIK_ACME_MAIL: wkloucek@owncloud.com - OCIS_DOCKER_TAG: 4.0.0 + TRAEFIK_ACME_MAIL: mbarz@owncloud.com + OCIS_DOCKER_TAG: 4.0.6 OCIS_DOMAIN: ocis.ocis-ldap.released.owncloud.works LDAP_MANAGER_DOMAIN: ldap.ocis-ldap.released.owncloud.works COMPOSE_FILE: docker-compose.yml:monitoring_tracing/docker-compose-additions.yml diff --git a/deployments/continuous-deployment-config/ocis_s3/latest.yml b/deployments/continuous-deployment-config/ocis_s3/latest.yml index a6a37bf714..629ab936cc 100644 --- a/deployments/continuous-deployment-config/ocis_s3/latest.yml +++ b/deployments/continuous-deployment-config/ocis_s3/latest.yml @@ -2,12 +2,12 @@ - name: continuous-deployment-ocis-s3-latest server: server_type: cx21 - image: ubuntu-20.04 + image: ubuntu-22.04 location: nbg1 initial_ssh_key_names: - owncloud-ocis@drone.owncloud.com labels: - owner: wkloucek + owner: ocis-team for: oCIS-continuous-deployment-examples rebuild: $REBUILD rebuild_carry_paths: @@ -31,7 +31,7 @@ docker_compose_path: deployments/examples/ocis_s3 env: INSECURE: "false" - TRAEFIK_ACME_MAIL: wkloucek@owncloud.com + TRAEFIK_ACME_MAIL: mbarz@owncloud.com OCIS_DOCKER_TAG: latest OCIS_DOMAIN: ocis.ocis-s3.latest.owncloud.works MINIO_DOMAIN: minio.ocis-s3.latest.owncloud.works diff --git a/deployments/continuous-deployment-config/ocis_traefik/daily.yml b/deployments/continuous-deployment-config/ocis_traefik/daily.yml index 7f5da3f3f2..505693fb73 100644 --- a/deployments/continuous-deployment-config/ocis_traefik/daily.yml +++ b/deployments/continuous-deployment-config/ocis_traefik/daily.yml @@ -2,12 +2,12 @@ - name: continuous-deployment-ocis-traefik-daily server: server_type: cx21 - image: ubuntu-20.04 + image: ubuntu-22.04 location: nbg1 initial_ssh_key_names: - owncloud-ocis@drone.owncloud.com labels: - owner: wkloucek + owner: ocis-team for: oCIS-continuous-deployment-examples rebuild: $REBUILD rebuild_carry_paths: @@ -31,7 +31,7 @@ docker_compose_path: deployments/examples/ocis_traefik env: INSECURE: "false" - TRAEFIK_ACME_MAIL: wkloucek@owncloud.com + TRAEFIK_ACME_MAIL: mbarz@owncloud.com OCIS_DOCKER_TAG: latest OCIS_DOMAIN: ocis.ocis-traefik.daily.owncloud.works DEMO_USERS: "true" diff --git a/deployments/continuous-deployment-config/ocis_traefik/latest.yml b/deployments/continuous-deployment-config/ocis_traefik/latest.yml index abb6072303..cbdf59c87b 100644 --- a/deployments/continuous-deployment-config/ocis_traefik/latest.yml +++ b/deployments/continuous-deployment-config/ocis_traefik/latest.yml @@ -2,12 +2,12 @@ - name: continuous-deployment-ocis-traefik-latest server: server_type: cx21 - image: ubuntu-20.04 + image: ubuntu-22.04 location: nbg1 initial_ssh_key_names: - owncloud-ocis@drone.owncloud.com labels: - owner: wkloucek + owner: ocis-team for: oCIS-continuous-deployment-examples rebuild: $REBUILD rebuild_carry_paths: @@ -31,7 +31,7 @@ docker_compose_path: deployments/examples/ocis_traefik env: INSECURE: "false" - TRAEFIK_ACME_MAIL: wkloucek@owncloud.com + TRAEFIK_ACME_MAIL: mbarz@owncloud.com OCIS_DOCKER_TAG: latest OCIS_DOMAIN: ocis.ocis-traefik.latest.owncloud.works DEMO_USERS: "true" diff --git a/deployments/continuous-deployment-config/ocis_traefik/released.yml b/deployments/continuous-deployment-config/ocis_traefik/released.yml index befd8657bb..e9edb16e93 100644 --- a/deployments/continuous-deployment-config/ocis_traefik/released.yml +++ b/deployments/continuous-deployment-config/ocis_traefik/released.yml @@ -2,12 +2,12 @@ - name: continuous-deployment-ocis-traefik-released server: server_type: cx21 - image: ubuntu-20.04 + image: ubuntu-22.04 location: nbg1 initial_ssh_key_names: - owncloud-ocis@drone.owncloud.com labels: - owner: wkloucek + owner: ocis-team for: oCIS-continuous-deployment-examples rebuild: $REBUILD rebuild_carry_paths: @@ -31,8 +31,8 @@ docker_compose_path: deployments/examples/ocis_traefik env: INSECURE: "false" - TRAEFIK_ACME_MAIL: wkloucek@owncloud.com - OCIS_DOCKER_TAG: 4.0.0 + TRAEFIK_ACME_MAIL: mbarz@owncloud.com + OCIS_DOCKER_TAG: 4.0.6 OCIS_DOMAIN: ocis.ocis-traefik.released.owncloud.works DEMO_USERS: "true" INBUCKET_DOMAIN: mail.ocis-traefik.released.owncloud.works diff --git a/deployments/continuous-deployment-config/ocis_wopi/daily.yml b/deployments/continuous-deployment-config/ocis_wopi/daily.yml index 85c43d21ac..afa7c4356d 100644 --- a/deployments/continuous-deployment-config/ocis_wopi/daily.yml +++ b/deployments/continuous-deployment-config/ocis_wopi/daily.yml @@ -2,12 +2,12 @@ - name: continuous-deployment-ocis-wopi-daily server: server_type: cx21 - image: ubuntu-20.04 + image: ubuntu-22.04 location: nbg1 initial_ssh_key_names: - owncloud-ocis@drone.owncloud.com labels: - owner: wkloucek + owner: ocis-team for: oCIS-continuous-deployment-examples rebuild: $REBUILD rebuild_carry_paths: @@ -31,7 +31,7 @@ docker_compose_path: deployments/examples/ocis_wopi env: INSECURE: "false" - TRAEFIK_ACME_MAIL: wkloucek@owncloud.com + TRAEFIK_ACME_MAIL: mbarz@owncloud.com OCIS_DOCKER_TAG: latest OCIS_DOMAIN: ocis.ocis-wopi.daily.owncloud.works COMPANION_DOMAIN: companion.ocis-wopi.daily.owncloud.works diff --git a/deployments/continuous-deployment-config/ocis_wopi/latest.yml b/deployments/continuous-deployment-config/ocis_wopi/latest.yml index a806c0a4ef..61a8c40523 100644 --- a/deployments/continuous-deployment-config/ocis_wopi/latest.yml +++ b/deployments/continuous-deployment-config/ocis_wopi/latest.yml @@ -2,12 +2,12 @@ - name: continuous-deployment-ocis-wopi-latest server: server_type: cx21 - image: ubuntu-20.04 + image: ubuntu-22.04 location: nbg1 initial_ssh_key_names: - owncloud-ocis@drone.owncloud.com labels: - owner: wkloucek + owner: ocis-team for: oCIS-continuous-deployment-examples rebuild: $REBUILD rebuild_carry_paths: @@ -31,7 +31,7 @@ docker_compose_path: deployments/examples/ocis_wopi env: INSECURE: "false" - TRAEFIK_ACME_MAIL: wkloucek@owncloud.com + TRAEFIK_ACME_MAIL: mbarz@owncloud.com OCIS_DOCKER_TAG: latest OCIS_DOMAIN: ocis.ocis-wopi.latest.owncloud.works COMPANION_DOMAIN: companion.ocis-wopi.latest.owncloud.works diff --git a/deployments/continuous-deployment-config/ocis_wopi/released.yml b/deployments/continuous-deployment-config/ocis_wopi/released.yml index c8521d3400..e288df3677 100644 --- a/deployments/continuous-deployment-config/ocis_wopi/released.yml +++ b/deployments/continuous-deployment-config/ocis_wopi/released.yml @@ -2,12 +2,12 @@ - name: continuous-deployment-ocis-wopi-released server: server_type: cx21 - image: ubuntu-20.04 + image: ubuntu-22.04 location: nbg1 initial_ssh_key_names: - owncloud-ocis@drone.owncloud.com labels: - owner: wkloucek + owner: ocis-team for: oCIS-continuous-deployment-examples rebuild: $REBUILD rebuild_carry_paths: @@ -31,8 +31,8 @@ docker_compose_path: deployments/examples/ocis_wopi env: INSECURE: "false" - TRAEFIK_ACME_MAIL: wkloucek@owncloud.com - OCIS_DOCKER_TAG: 4.0.0 + TRAEFIK_ACME_MAIL: mbarz@owncloud.com + OCIS_DOCKER_TAG: 4.0.6 OCIS_DOMAIN: ocis.ocis-wopi.released.owncloud.works COMPANION_DOMAIN: companion.ocis-wopi.released.owncloud.works COMPANION_IMAGE: owncloud/uppy-companion:3.12.13-owncloud diff --git a/docs/ocis/adr/0001-introduce-accounts-service.md b/docs/ocis/adr/0001-introduce-accounts-service.md index e9fae408da..8aca5b16c7 100644 --- a/docs/ocis/adr/0001-introduce-accounts-service.md +++ b/docs/ocis/adr/0001-introduce-accounts-service.md @@ -8,7 +8,7 @@ geekdocFilePath: 0001-introduce-accounts-service.md --- * Status: superseded by [ADR-0003]({{< ref "0003-external-user-management.md" >}}) -* Deciders: @butonic, @felixboehm, @micbar, @pmaier1 +* Deciders: [@butonic](https://github.com/butonic), [@felixboehm](https://github.com/felixboehm), [@micbar](https://github.com/micbar), [@pmaier1](https://github.com/pmaier1) * Date: [2020-06-15](https://github.com/owncloud/ocis-accounts/pull/34/commits/2fd05e2b6fe2a47c687bd0c0bc5e1b5c48a585b2) Technical Story: [persist accounts](https://github.com/owncloud/ocis-accounts/pull/34) diff --git a/docs/ocis/adr/0002-persist-accounts-using-cs3-storage.md b/docs/ocis/adr/0002-persist-accounts-using-cs3-storage.md index 7985f83d59..dfbe8b9f7b 100644 --- a/docs/ocis/adr/0002-persist-accounts-using-cs3-storage.md +++ b/docs/ocis/adr/0002-persist-accounts-using-cs3-storage.md @@ -8,7 +8,7 @@ geekdocFilePath: 0002-persist-accounts-using-cs3-storage.md --- * Status: accepted -* Deciders: @butonic, @felixboehm +* Deciders: [@butonic](https://github.com/butonic), [@felixboehm](https://github.com/felixboehm) * Date: 2020-08-21 Technical Story: [File system based indexing](https://github.com/owncloud/ocis-accounts/pull/92) diff --git a/docs/ocis/adr/0003-external-user-management.md b/docs/ocis/adr/0003-external-user-management.md index 7cdb66dda1..7d914500b0 100644 --- a/docs/ocis/adr/0003-external-user-management.md +++ b/docs/ocis/adr/0003-external-user-management.md @@ -8,7 +8,7 @@ geekdocFilePath: 0003-external-user-management.md --- * Status: superseded by [17. Allow read only external User Management]({{< ref "0017-allow-read-only-external-user-management.md" >}}) -* Deciders: @butonic, @micbar, @dragotin, @hodyroff, @pmaier1 +* Deciders: [@butonic](https://github.com/butonic), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin), [@hodyroff](https://github.com/hodyroff), [@pmaier1](https://github.com/pmaier1) * Date: 2022-02-08 Technical Story: [Skip account-service by talking to CS3 user-api](https://github.com/owncloud/ocis/pull/1020) diff --git a/docs/ocis/adr/0004-support-hot-migration.md b/docs/ocis/adr/0004-support-hot-migration.md index 5cf4fcf3fe..ab1f7d4d65 100644 --- a/docs/ocis/adr/0004-support-hot-migration.md +++ b/docs/ocis/adr/0004-support-hot-migration.md @@ -8,7 +8,7 @@ geekdocFilePath: 0004-support-hot-migration.md --- * Status: proposed -* Deciders: @butonic, @micbar, @dragotin, @hodyroff, @pmaier1 +* Deciders: [@butonic](https://github.com/butonic), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin), [@hodyroff](https://github.com/hodyroff), [@pmaier1](https://github.com/pmaier1) * Date: 2021-03-16 Technical Story: \[description | ticket/issue URL\] diff --git a/docs/ocis/adr/0005-cs3-api-account-management.md b/docs/ocis/adr/0005-cs3-api-account-management.md index b37cc3fe74..818452a85c 100644 --- a/docs/ocis/adr/0005-cs3-api-account-management.md +++ b/docs/ocis/adr/0005-cs3-api-account-management.md @@ -8,7 +8,7 @@ geekdocFilePath: 0005-cs3-api-account-management.md --- * Status: proposed -* Deciders: @refs, @butonic, @micbar, @dragotin, @pmaier1 +* Deciders: [@refs](https://github.com/refs), [@butonic](https://github.com/butonic), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin), [@pmaier1](https://github.com/pmaier1) * Date: 2021-04-12 Technical Story: [Write only management API for User and Group resources](https://github.com/cs3org/cs3apis/pull/119) diff --git a/docs/ocis/adr/0006-service-discovery.md b/docs/ocis/adr/0006-service-discovery.md index b3412f9b4a..61461b9b77 100644 --- a/docs/ocis/adr/0006-service-discovery.md +++ b/docs/ocis/adr/0006-service-discovery.md @@ -8,7 +8,7 @@ geekdocFilePath: 0006-service-discovery.md --- * Status: accepted -* Deciders: @refs, @butonic, @micbar, @dragotin, @pmaier1 +* Deciders: [@refs](https://github.com/refs), [@butonic](https://github.com/butonic), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin), [@pmaier1](https://github.com/pmaier1) * Date: 2021-04-19 Technical Story: [Introduce Named Services.](https://github.com/cs3org/reva/pull/1509) diff --git a/docs/ocis/adr/0007-api-for-spaces.md b/docs/ocis/adr/0007-api-for-spaces.md index 020499da95..9d6ffe8c47 100644 --- a/docs/ocis/adr/0007-api-for-spaces.md +++ b/docs/ocis/adr/0007-api-for-spaces.md @@ -8,7 +8,7 @@ geekdocFilePath: 0007-api-for-spaces.md --- * Status: accepted -* Deciders: @butonic, @micbar, @dragotin, @hodyroff, @pmaier1 +* Deciders: [@butonic](https://github.com/butonic), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin), [@hodyroff](https://github.com/hodyroff), [@pmaier1](https://github.com/pmaier1) * Date: 2021-03-19 Technical Story: API to enable the concept of [Spaces](https://github.com/owncloud/enterprise/issues/3863) diff --git a/docs/ocis/adr/0008-configuration.md b/docs/ocis/adr/0008-configuration.md index 14bb243cbf..c3dbdb17cd 100644 --- a/docs/ocis/adr/0008-configuration.md +++ b/docs/ocis/adr/0008-configuration.md @@ -8,7 +8,7 @@ geekdocFilePath: 0008-configuration.md --- * Status: proposed -* Deciders: @refs, @butonic, @micbar, @dragotin, @pmaier1 +* Deciders: [@refs](https://github.com/refs), [@butonic](https://github.com/butonic), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin), [@pmaier1](https://github.com/pmaier1) * Date: 2021-05-03 ## Context and Problem Statement diff --git a/docs/ocis/adr/0009-extension-template.md b/docs/ocis/adr/0009-extension-template.md index 7ac7ead3d1..bf4a02ac39 100644 --- a/docs/ocis/adr/0009-extension-template.md +++ b/docs/ocis/adr/0009-extension-template.md @@ -8,7 +8,7 @@ geekdocFilePath: 0009-extension-template.md --- * Status: proposed -* Deciders: @c0rby +* Deciders: [@c0rby](https://github.com/c0rby) * Date: 2021-06-10 Technical Story: [description | ticket/issue URL] diff --git a/docs/ocis/adr/0010-policy-enforcement.md b/docs/ocis/adr/0010-policy-enforcement.md index 31f2e0f67f..1cc24f8dec 100644 --- a/docs/ocis/adr/0010-policy-enforcement.md +++ b/docs/ocis/adr/0010-policy-enforcement.md @@ -8,7 +8,7 @@ geekdocFilePath: 0010-policy-enforcement.md --- * Status: proposed -* Deciders: @butonic, @micbar, @dragotin, @hodyroff, @pmaier1, @fschade +* Deciders: [@butonic](https://github.com/butonic), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin), [@hodyroff](https://github.com/hodyroff), [@pmaier1](https://github.com/pmaier1), [@fschade](https://github.com/fschade) * Date: 2021-06-30 ## Context and Problem Statement diff --git a/docs/ocis/adr/0011-global-url-format.md b/docs/ocis/adr/0011-global-url-format.md index 4d4fe1b280..d3ecf1bbee 100644 --- a/docs/ocis/adr/0011-global-url-format.md +++ b/docs/ocis/adr/0011-global-url-format.md @@ -8,7 +8,7 @@ geekdocFilePath: 0011-global-url-format.md --- * Status: accepted -* Deciders: @refs, @butonic, @micbar, @dragotin, @hodyroff, @pmaier1, @fschade, @tbsbdr, @kulmann +* Deciders: [@refs](https://github.com/refs), [@butonic](https://github.com/butonic), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin), [@hodyroff](https://github.com/hodyroff), [@pmaier1](https://github.com/pmaier1), [@fschade](https://github.com/fschade), [@tbsbdr](https://github.com/tbsbdr), [@kulmann](https://github.com/kulmann) * Date: 2021-07-07 ## Context and Problem Statement diff --git a/docs/ocis/adr/0012-tracing.md b/docs/ocis/adr/0012-tracing.md index 3c258badb0..e804b4853c 100644 --- a/docs/ocis/adr/0012-tracing.md +++ b/docs/ocis/adr/0012-tracing.md @@ -8,7 +8,7 @@ geekdocFilePath: 0012-tracing.md --- * Status: proposed -* Deciders: @butonic, @micbar, @dragotin, @mstingl, @pmaier1, @fschade +* Deciders: [@butonic](https://github.com/butonic), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin), [@mstingl](https://github.com/mstingl) [@pmaier1](https://github.com/pmaier1), [@fschade](https://github.com/fschade) * Date: 2021-08-17 ## Context and Problem Statement diff --git a/docs/ocis/adr/0013-locking.md b/docs/ocis/adr/0013-locking.md index 8da189d5dc..693e651c64 100644 --- a/docs/ocis/adr/0013-locking.md +++ b/docs/ocis/adr/0013-locking.md @@ -8,7 +8,7 @@ geekdocFilePath: 0013-locking.md --- - Status: accepted -- Deciders: @hodyroff, @pmaier1, @jojowein, @dragotin, @micbar, @tbsbdr, @wkloucek +- Deciders: [@hodyroff](https://github.com/hodyroff), [@pmaier1](https://github.com/pmaier1), [@jojowein](https://github.com/jojowein), [@dragotin](https://github.com/dragotin), [@micbar](https://github.com/micbar), [@tbsbdr](https://github.com/tbsbdr), [@wkloucek](https://github.com/wkloucek) - Date: 2021-11-03 ## Context and Problem Statement diff --git a/docs/ocis/adr/0014-microservices-runtime.md b/docs/ocis/adr/0014-microservices-runtime.md index 89f68523cf..8587089c03 100644 --- a/docs/ocis/adr/0014-microservices-runtime.md +++ b/docs/ocis/adr/0014-microservices-runtime.md @@ -8,7 +8,7 @@ geekdocFilePath: 0014-microservices-runtime.md --- * Status: proposed -* Deciders: @butonic, @micbar, @dragotin, @mstingl, @pmaier1, @fschade +* Deciders: [@butonic](https://github.com/butonic), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin), [@mstingl](https://github.com/mstingl) [@pmaier1](https://github.com/pmaier1), [@fschade](https://github.com/fschade) * Date: 2022-01-21 ## Context and Problem Statement diff --git a/docs/ocis/adr/0015-events.md b/docs/ocis/adr/0015-events.md index af56da7f0f..4a1f55727b 100644 --- a/docs/ocis/adr/0015-events.md +++ b/docs/ocis/adr/0015-events.md @@ -8,7 +8,7 @@ geekdocFilePath: 0015-events.md --- * Status: proposed -* Deciders: @butonic, @micbar, @dragotin, @c0rby, @wkloucek +* Deciders: [@butonic](https://github.com/butonic), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin), [@c0rby](https://github.com/c0rby), [@wkloucek](https://github.com/wkloucek) * Date: 2022-01-21 ## Context and Problem Statement diff --git a/docs/ocis/adr/0016-files-metadata.md b/docs/ocis/adr/0016-files-metadata.md index 50069d09c6..abb7dabf8b 100644 --- a/docs/ocis/adr/0016-files-metadata.md +++ b/docs/ocis/adr/0016-files-metadata.md @@ -7,8 +7,8 @@ geekdocEditPath: edit/master/docs/ocis/adr geekdocFilePath: 0016-files-metadata.md --- -* Status: proposed -* Deciders: @butonic, @dragotin, @micbar, @C0rby +* Status: superseded by [ADR-0024]({{< ref "0024-msgpack-metadata.md" >}}) +* Deciders: [@butonic](https://github.com/butonic), [@dragotin](https://github.com/dragotin), [@micbar](https://github.com/micbar), [@c0rby](https://github.com/c0rby) * Date: 2022-02-04 ## Context and Problem Statement diff --git a/docs/ocis/adr/0017-allow-read-only-external-user-management.md b/docs/ocis/adr/0017-allow-read-only-external-user-management.md index 9da53c9584..cfd78e7560 100644 --- a/docs/ocis/adr/0017-allow-read-only-external-user-management.md +++ b/docs/ocis/adr/0017-allow-read-only-external-user-management.md @@ -8,7 +8,7 @@ geekdocFilePath: 0017-allow-read-only-external-user-management.md --- * Status: proposed -* Deciders: @butonic, @micbar, @rhafer +* Deciders: [@butonic](https://github.com/butonic), [@micbar](https://github.com/micbar), [@rhafer](https://github.com/rhafer) * Date: 2022-02-08 ## Context and Problem Statement diff --git a/docs/ocis/adr/0018-file-search-api.md b/docs/ocis/adr/0018-file-search-api.md index fd99405ec1..51fc25250a 100644 --- a/docs/ocis/adr/0018-file-search-api.md +++ b/docs/ocis/adr/0018-file-search-api.md @@ -8,7 +8,7 @@ geekdocFilePath: 0018-file-search-api.md --- * Status: proposed -* Deciders: @butonic, @micbar, @dragotin, @C0rby +* Deciders: [@butonic](https://github.com/butonic), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin), [@c0rby](https://github.com/c0rby) * Date: 2022-03-18 ## Context and Problem Statement diff --git a/docs/ocis/adr/0019-file-search-index.md b/docs/ocis/adr/0019-file-search-index.md index 2e6ecf52a5..b80b56c5d2 100644 --- a/docs/ocis/adr/0019-file-search-index.md +++ b/docs/ocis/adr/0019-file-search-index.md @@ -7,8 +7,8 @@ geekdocEditPath: edit/master/docs/ocis/adr geekdocFilePath: 0019-file-search-index.md --- -* Status: proposed -* Deciders: @butonic, @micbar, @dragotin, @C0rby +* Status: accepted +* Deciders: [@butonic](https://github.com/butonic), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin), [@c0rby](https://github.com/c0rby) * Date: 2022-03-18 ## Context and Problem Statement diff --git a/docs/ocis/adr/0020-file-search-query-language.md b/docs/ocis/adr/0020-file-search-query-language.md index d5156057f7..372a9065e4 100644 --- a/docs/ocis/adr/0020-file-search-query-language.md +++ b/docs/ocis/adr/0020-file-search-query-language.md @@ -8,7 +8,7 @@ geekdocFilePath: 0020-file-search-query-language.md --- * Status: accepted -* Deciders: @butonic, @micbar, @dragotin, @C0rby, @kulmann, @felix-schwarz, @JammingBen +* Deciders: [@butonic](https://github.com/butonic), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin), [@c0rby](https://github.com/c0rby), [@kulmann](https://github.com/kulmann), [@felix-schwarz](https://github.com/felix-schwarz), [@JammingBen](https://github.com/JammingBen) * Date: 2023-06-23 ## Context and Problem Statement diff --git a/docs/ocis/adr/0021-service-accounts.md b/docs/ocis/adr/0021-service-accounts.md index dc6ed305ee..776e6a9cc5 100644 --- a/docs/ocis/adr/0021-service-accounts.md +++ b/docs/ocis/adr/0021-service-accounts.md @@ -8,7 +8,7 @@ geekdocFilePath: 0021-service-accounts.md --- * Status: proposed -* Deciders: @butonic, @C0rby +* Deciders: [@butonic](https://github.com/butonic), [@c0rby](https://github.com/c0rby) * Date: 2023-01-18 ## Context and Problem Statement diff --git a/docs/ocis/adr/0022-sharing-and-space-management-api.md b/docs/ocis/adr/0022-sharing-and-space-management-api.md index 4a6ad4f368..4256e2d879 100644 --- a/docs/ocis/adr/0022-sharing-and-space-management-api.md +++ b/docs/ocis/adr/0022-sharing-and-space-management-api.md @@ -8,7 +8,7 @@ geekdocFilePath: 0022-sharing-and-space-management-api.md --- * Status: accepted -* Deciders: @jammingben @butonic @theonering @kobergj @micbar +* Deciders: [@JammingBen](https://github.com/JammingBen) [@butonic](https://github.com/butonic) [@theonering](https://github.com/theonering) [@kobergj](https://github.com/kobergj) [@micbar](https://github.com/micbar) * Date: 2023-08-08 Technical Story: [Public issue](https://github.com/owncloud/ocis/issues/6993) diff --git a/docs/ocis/adr/0023-index-and-store-metadata.md b/docs/ocis/adr/0023-index-and-store-metadata.md index 3dc7da9246..e040487911 100644 --- a/docs/ocis/adr/0023-index-and-store-metadata.md +++ b/docs/ocis/adr/0023-index-and-store-metadata.md @@ -9,7 +9,7 @@ geekdocFilePath: 0023-index-and-store-metadata.md * Status: accepted -* Deciders: @butonic, @dschmidt, @micbar, @dragotin +* Deciders: [@butonic](https://github.com/butonic), [@theonering](https://github.com/dschmidt), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin) * Date: 2023-10-17 ## Context and Problem Statement diff --git a/docs/ocis/adr/0024-msgpack-metadata.md b/docs/ocis/adr/0024-msgpack-metadata.md new file mode 100644 index 0000000000..fb046dc687 --- /dev/null +++ b/docs/ocis/adr/0024-msgpack-metadata.md @@ -0,0 +1,83 @@ +--- +title: "24. Messagepack metadata" +date: 2024-02-09T14:57:00+01:00 +weight: 24 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/ocis/adr +geekdocFilePath: 0024-msgpack-metadata.md +--- + + +* Status: accepted +* Deciders: [@butonic](https://github.com/butonic), [@aduffeck](https://github.com/aduffeck), [@micbar](https://github.com/micbar), [@dragotin](https://github.com/dragotin) +* Date: [2023-03-15](https://github.com/cs3org/reva/pull/3711/commits/204253eee9dbb8e7fa93a01f3f94a2d28ce40a06) + +## Context and Problem Statement + +File metadata management is an important aspect for oCIS as a data platform. While using extended attributes to store metadata allows attaching the metadata to the actual file it causes a significant amount of syscalls that outweigh the benefits. Furthermore, filesystems are subject to different limitations in the number of extended attributes or the value size that is available. + +## Decision Drivers + +Performance of reading extended attributes suffers from the syscall overhead when listing and reading all attributes. Getting rid of limitations imposed by the filesystem used to store decomposedfs metadata. + +## Considered Options + +Going back to the original [ADR-0016 Storage for Files Metadata]({{< ref "0016-files-metadata.md" >}}) we decided to use a dedicated file for metadata storage next to the decomposedfs file representing the node. Several options for the data format were considered: + +* Use JSON files to store metadata +* Use INI files to store metadata +* Use msgpack files to store metadata +* Use protobuf messages to store metadata + +## Decision Outcome + +Chosen option: "[msgpack files](#msgpack-files)", because we want to stay with a self describing binary format. This is a performance tradeoff that is faster and more efficient than text based formats and more flexible but less efficient than protobuf. + +Note: directory listings are still read from the storage and remain uncached. + +### Positive Consequences: + +* Way less syscalls +* Node metadata can easily be cached, avoiding all trips to the storage until a file changes. + +### Negative Consequences: + +* We need to migrate existing metadata +* We need to build tooling that allows manipulating metadata similar to `setfattr` and `getfattr`. + +## Pros and Cons of the Options + +### Ini files + +* Good, human readable +* Good, self describing +* Good, widely used and well understood +* Good, suited for key value like content - exactly what we need for extended attributes +* Bad, slower and less efficient than binary formats + +### JSON files + +* Good, human readable +* Good, self describing +* Good, widely used and well understood +* Good, could be used for more than just key value +* Bad, slower and less efficient than binary formats + +### Msgpack files + +* Good, self describing +* Good, efficient because it is binary encoded +* Good, could be used for more than just key value +* Bad, not human readable - requires tooling to manipulate safely + +### protobuf files + +* Good, very efficient because it is binary encoded +* Good, could be used for more than just key value +* Bad, not human readable +* Bad, not self describing - requires tooling to evolve the messages + +## Links + +* supersedes [ADR-0016 Storage for Files Metadata]({{< ref "0016-files-metadata.md" >}}) +* [The need for speed — Experimenting with message serialization](https://medium.com/@hugovs/the-need-for-speed-experimenting-with-message-serialization-93d7562b16e4) \ No newline at end of file diff --git a/docs/ocis/adr/0025-distributed-search-index.md b/docs/ocis/adr/0025-distributed-search-index.md new file mode 100644 index 0000000000..5f257dbdc0 --- /dev/null +++ b/docs/ocis/adr/0025-distributed-search-index.md @@ -0,0 +1,76 @@ +--- +title: "25. Distributed Search Index" +date: 2024-02-09T16:27:00+01:00 +weight: 25 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/ocis/adr +geekdocFilePath: 0025-distributed-search-index.md +--- + +* Status: draft +* Deciders: [@butonic](https://github.com/butonic), [@fschade](https://github.com/fschade), [@aduffeck](https://github.com/aduffeck) +* Date: 2024-02-09 + +## Context and Problem Statement + +Search is currently implemented with [blevesearch](https://github.com/blevesearch/bleve), which internally uses bbolt. bbolt writes to a local file, which prevents scaling out the service. + +The initial implementation used a single blevesearch index for all spaces. While this makes querying all spaces easy because the results do not need to be aggregated from multiple indexes, the single node becomes a bottleneck when answering search queries. Furthermore, indexing is also part of the search service and has to share the resources. + +## Decision Drivers + +* Indexing should be decoupled from the search service +* The search service should be able to scale horizontally +* The solution needs to be embeddable in the single binary + +## Considered Options + +* one index per space +* [elasticsearch](https://github.com/elastic/elasticsearch) (java) +* [dgraph](https://github.com/dgraph-io/dgraph) (go) +* [manticore](https://github.com/manticoresoftware/manticoresearch/) (C++) +* [meilisearch](https://github.com/meilisearch/meilisearch) (Rust) + +## Decision Outcome + +Chosen option: *???* + +### Positive Consequences: + +* TODO + +### Negative Consequences: + +* TODO + +## Pros and Cons of the Options + +### one index per space + +Instead of using a single index (current implementation) or a distributed search index like elasticsearch the search service should aggregate queries from dedicated indexes per space. The api to a space index provider should be able to take multiple space ids in the request, similar to how a storage provider can handle multiple spaces. When treating spaces and the corresponding search index to belong together we can also treat them as a single unit for backup and restore. In federated deployments we can send the search queries to all search providers / spaces that the user has access to. + +How a search provider is implemented then depends on the requirements. For a single node deployment bleve might be fine, for a kubernetes deployment a dedicated service might be the better fit. + +### elasticsearch + +* Good, commercial support available at https://www.elastic.co/de/pricing +* Good, industry standard +* Bad, nobody seems to like it +* Bad, not embeddable (Java) + +### dgraph + +* Good, commercial support available at https://dgraph.io/pricing +* Good, embeddable? (go) - TODO verify + +### manticore +* Good, commercial support available at https://manticoresearch.com/services/ +* Bad, not embeddable (C++) + +### meilisearch +* Good, commercial support available at https://www.meilisearch.com/pricing +* Bad, not embeddable (Rust) + +## Links + +* supersedes [ADR-0019 File Search Index]({{< ref "0019-file-search-index.md" >}}) \ No newline at end of file diff --git a/docs/ocis/adr/0026-application-based-user-settings.md b/docs/ocis/adr/0026-application-based-user-settings.md new file mode 100644 index 0000000000..1ed488f4c1 --- /dev/null +++ b/docs/ocis/adr/0026-application-based-user-settings.md @@ -0,0 +1,93 @@ +--- +title: "26. Application based user settings" +date: 2024-02-09T17:30:00+01:00 +weight: 26 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/ocis/adr +geekdocFilePath: 0026-application-based-user-settings.md +--- + +* Status: draft +* Deciders: [@butonic](https://github.com/butonic), [@fschade](https://github.com/fschade), [@kulmann](https://github.com/kulmann) +* Date: 2024-02-09 + +## Context and Problem Statement + +To share user settings across devices applications want to store user specific settings on the server. The ePUB app wants to remember which page the user is on. The iOS app wants to rember search queries. The Caldav app needs a space to store data. + +## Decision Drivers + +## Considered Options + +* OCS provisioning API +* settings service +* libregraph API + +## Decision Outcome + +Chosen option: *???* + +### Positive Consequences: + +* TODO + +### Negative Consequences: + +* TODO + +## Pros and Cons of the Options + +### OCS provisioning API + +Nextcloud added a `/ocs/v2.php/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}` endpoint + +* Bad, legacy API we want to get rid of + +### settings service + +- Bad, yet another API. Always uses POST requests. + +### libregraph API + +The MS Graph API has [a special approot driveItem](https://learn.microsoft.com/en-us/graph/api/drive-get-specialfolder?view=graph-rest-1.0&tabs=http) that apps can use to store arbitrary files. See also: +[Using an App Folder to store user content without access to all files](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/concepts/special-folders-appfolder?view=odsp-graph-online) and a blog post with the section [Store data in the application’s personal folder](https://blog.mastykarz.nl/easiest-store-user-settings-microsoft-365-app/#store-data-in-the-applications-personal-folder). + +It basically uses the `/me/drive/special/approot:/{filename}` endpoint to +```http +PUT https://graph.microsoft.com/v1.0/me/drive/special/approot:/settings.json:/content +content-type: text/plain +authorization: Bearer abc + +{"key": "value"} +``` +or +```http +GET https://graph.microsoft.com/v1.0/me/drive/special/approot:/settings.json:/content +authorization: Bearer abc +``` + +On single page apps you need two requests: +```http +GET https://graph.microsoft.com/v1.0/me/drive/special/approot:/settings.json?select=@microsoft.graph.downloadUrl +authorization: Bearer abc +``` +followed by +```http +GET +``` + +Currently, applications have no dedicated tokens that we could use to derive the `appid` from. All apps should have an `appid` and [be discoverable under](https://learn.microsoft.com/en-us/graph/api/application-list?view=graph-rest-1.0&tabs=http) +```http +GET /applications +``` + +In any case for libregraph we could introduce a `LIBRE_GRAPH_APPID` header to make these requests possible rather soon. + +Then we can decide if we want to store these files in the users personal drive, or if we create a space for every app that then uses the userid as a folder that contains all the files for the user. + +- Good, because clients can remain in libregraph API land +- Bad, we currently have no application tokens + + + +## Links diff --git a/docs/services/general-info/env-var-deltas/4.0.0-5.0.0-added.md b/docs/services/general-info/env-var-deltas/4.0.0-5.0.0-added.md index 9303ac2a64..06a6f81e4b 100644 --- a/docs/services/general-info/env-var-deltas/4.0.0-5.0.0-added.md +++ b/docs/services/general-info/env-var-deltas/4.0.0-5.0.0-added.md @@ -219,7 +219,7 @@ | | `OCIS_EVENTS_AUTH_PASSWORD;USERLOG_EVENTS_AUTH_PASSWORD` | The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services. | | | | `OCIS_SERVICE_ACCOUNT_ID;USERLOG_SERVICE_ACCOUNT_ID` | The ID of the service account the service should use. See the 'auth-service' service description for more details. | | | | `OCIS_SERVICE_ACCOUNT_SECRET;USERLOG_SERVICE_ACCOUNT_SECRET` | The service account secret. | | -| services/web/pkg/config/options.go | `WEB_OPTION_LOGIN_URL`Specifies the target URL to the login page. This is helpful when an external IdP is used. This option is disabled by default. Example URL like: https://www.myidp.com/login. | | | +| services/web/pkg/config/options.go | `WEB_OPTION_LOGIN_URL` | Specifies the target URL to the login page. This is helpful when an external IdP is used. This option is disabled by default. Example URL like: https://www.myidp.com/login. | | | | | `WEB_OPTION_DISABLED_EXTENSIONS` | A list to disable specific Web extensions identified by their ID. The ID can e.g. be taken from the 'index.ts' file of the web extension. Example: 'com.github.owncloud.web.files.search,com.github.owncloud.web.files.print'. See the Environment Variable Types description for more details. | | | | `WEB_OPTION_USER_LIST_REQUIRES_FILTER` | Defines whether one or more filters must be set in order to list users in the Web admin settings. Set this option to 'true' if running in an environment with a lot of users and listing all users could slow down performance. Defaults to 'false'. | false | | | `WEB_OPTION_EMBED_ENABLED` | Defines whether Web should be running in 'embed' mode. Setting this to 'true' will enable a stripped down version of Web with reduced functionality used to integrate Web into other applications like via iFrame. Setting it to 'false' or not setting it (default) will run Web as usual with all functionality enabled. See the text description for more details. | | diff --git a/go.mod b/go.mod index eaff57a694..ca600f720d 100644 --- a/go.mod +++ b/go.mod @@ -13,14 +13,14 @@ require ( github.com/cenkalti/backoff 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.1-0.20240208105019-d5e420d294be + github.com/cs3org/reva/v2 v2.19.0 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 github.com/egirna/icap-client v0.1.1 github.com/gabriel-vasile/mimetype v1.4.3 github.com/ggwhite/go-masker v1.1.0 - github.com/go-chi/chi/v5 v5.0.11 + github.com/go-chi/chi/v5 v5.0.12 github.com/go-chi/cors v1.2.1 github.com/go-chi/render v1.0.3 github.com/go-ldap/ldap/v3 v3.4.6 @@ -51,17 +51,17 @@ require ( github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 github.com/jellydator/ttlcache/v2 v2.11.1 - github.com/jellydator/ttlcache/v3 v3.1.1 + github.com/jellydator/ttlcache/v3 v3.2.0 github.com/jinzhu/now v1.1.5 github.com/justinas/alice v1.2.0 github.com/leonelquinteros/gotext v1.5.3-0.20230317130943-71a59c05b2c1 github.com/libregraph/idm v0.4.1-0.20231213140724-56a222fb4215 - github.com/libregraph/lico v0.61.1 + github.com/libregraph/lico v0.61.2 github.com/mitchellh/mapstructure v1.5.0 github.com/mna/pigeon v1.2.1 github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 github.com/nats-io/nats-server/v2 v2.10.10 - github.com/nats-io/nats.go v1.32.0 + github.com/nats-io/nats.go v1.33.1 github.com/oklog/run v1.1.0 github.com/olekukonko/tablewriter v0.0.5 github.com/onsi/ginkgo v1.16.5 @@ -82,11 +82,11 @@ require ( github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 github.com/thejerf/suture/v4 v4.0.2 - github.com/tidwall/gjson v1.17.0 + github.com/tidwall/gjson v1.17.1 github.com/tus/tusd v1.13.0 github.com/urfave/cli/v2 v2.27.1 github.com/xhit/go-simple-mail/v2 v2.16.0 - go-micro.dev/v4 v4.9.0 + go-micro.dev/v4 v4.10.2 go.etcd.io/bbolt v1.3.8 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 go.opentelemetry.io/contrib/zpages v0.48.0 @@ -103,7 +103,7 @@ require ( golang.org/x/term v0.17.0 golang.org/x/text v0.14.0 google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe - google.golang.org/grpc v1.61.1 + google.golang.org/grpc v1.62.0 google.golang.org/protobuf v1.32.0 gopkg.in/square/go-jose.v2 v2.6.0 gopkg.in/yaml.v2 v2.4.0 @@ -129,9 +129,9 @@ require ( github.com/amoghe/go-crypt v0.0.0-20220222110647-20eada5f5964 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/armon/go-radix v1.0.0 // indirect - github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect + github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/aws/aws-sdk-go v1.45.1 // indirect - github.com/beevik/etree v1.2.0 // indirect + github.com/beevik/etree v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bitly/go-simplejson v0.5.0 // indirect github.com/bits-and-blooms/bitset v1.2.1 // indirect @@ -160,7 +160,6 @@ require ( github.com/cilium/ebpf v0.9.1 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/containerd/cgroups/v3 v3.0.2 // indirect - github.com/coreos/go-oidc v2.2.1+incompatible // indirect github.com/coreos/go-semver v0.3.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cornelk/hashmap v1.0.8 // indirect @@ -178,7 +177,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/egirna/icap v0.0.0-20181108071049-d5ee18bd70bc // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/emvi/iso-639-1 v1.0.1 // indirect + github.com/emvi/iso-639-1 v1.1.0 // indirect github.com/evanphx/json-patch/v5 v5.5.0 // indirect github.com/fatih/color v1.14.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -197,12 +196,12 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-micro/plugins/v4/events/natsjs v1.2.2-0.20231215124540-f7f8d3274bf9 // indirect github.com/go-micro/plugins/v4/store/nats-js v1.2.1-0.20231129143103-d72facc652f0 // indirect - github.com/go-micro/plugins/v4/store/redis v1.2.1-0.20230510195111-07cd57e1bc9d // indirect + github.com/go-micro/plugins/v4/store/redis v1.2.1 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-redis/redis/v8 v8.11.5 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect - github.com/go-sql-driver/mysql v1.6.0 // indirect + github.com/go-sql-driver/mysql v1.7.1 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/go-test/deep v1.1.0 // indirect github.com/gobwas/glob v0.2.3 // indirect @@ -216,7 +215,7 @@ require ( github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang-jwt/jwt/v5 v5.0.0 // indirect github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 // indirect - github.com/golang/glog v1.1.2 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect github.com/gomodule/redigo v1.8.9 // indirect @@ -231,16 +230,16 @@ require ( github.com/hashicorp/consul/api v1.15.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.3.1 // indirect + github.com/hashicorp/go-hclog v1.6.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-msgpack v1.1.5 // indirect - github.com/hashicorp/go-plugin v1.4.5 // indirect + github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect github.com/hashicorp/serf v0.10.0 // indirect - github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect - github.com/huandu/xstrings v1.3.2 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect + github.com/huandu/xstrings v1.4.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/imdario/mergo v0.3.15 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect @@ -250,7 +249,7 @@ require ( github.com/juliangruber/go-intersect v1.1.0 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/compress v1.17.5 // indirect - github.com/klauspost/cpuid/v2 v2.1.0 // indirect + github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/libregraph/oidc-go v1.0.0 // indirect github.com/longsleep/go-metrics v1.0.0 // indirect @@ -259,16 +258,16 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect - github.com/mattn/go-sqlite3 v1.14.19 // indirect + github.com/mattn/go-sqlite3 v1.14.22 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/maxymania/go-system v0.0.0-20170110133659-647cc364bf0b // indirect github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103 // indirect github.com/miekg/dns v1.1.50 // indirect - github.com/mileusna/useragent v1.2.1 // indirect + github.com/mileusna/useragent v1.3.4 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/minio/md5-simd v1.1.2 // indirect - github.com/minio/minio-go/v7 v7.0.42 // indirect - github.com/minio/sha256-simd v1.0.0 // indirect + github.com/minio/minio-go/v7 v7.0.66 // indirect + github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -289,7 +288,7 @@ require ( github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pquerna/cachecontrol v0.1.0 // indirect - github.com/prometheus/alertmanager v0.25.1 // indirect + github.com/prometheus/alertmanager v0.26.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.45.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect @@ -323,26 +322,26 @@ require ( github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect github.com/yashtewari/glob-intersection v0.2.0 // indirect - go.etcd.io/etcd/api/v3 v3.5.7 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect - go.etcd.io/etcd/client/v3 v3.5.7 // indirect + go.etcd.io/etcd/api/v3 v3.5.12 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.12 // indirect + go.etcd.io/etcd/client/v3 v3.5.12 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib v1.0.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.1 // indirect go.opentelemetry.io/otel/metric v1.23.1 // indirect go.opentelemetry.io/proto/otlp v1.1.0 // indirect - go.uber.org/atomic v1.10.0 // indirect + go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.23.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/sys v0.17.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.16.1 // indirect + golang.org/x/tools v0.17.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect + google.golang.org/genproto v0.0.0-20240205150955-31a09d347014 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index 5141a427f9..c5b1457349 100644 --- a/go.sum +++ b/go.sum @@ -41,7 +41,7 @@ cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMz cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= -cloud.google.com/go v0.111.0 h1:YHLKNupSD1KqjDbQ3+LVdQ81h/UJbJyZG203cEfnQgM= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= @@ -212,8 +212,8 @@ cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IK cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= +cloud.google.com/go/compute v1.23.4 h1:EBT9Nw4q3zyE7G45Wvv3MzolIrCJEuHys5muLY0wvAw= +cloud.google.com/go/compute v1.23.4/go.mod h1:/EJMj55asU6kAFnuZET8zqgwgJ9FvXWXOkkfQZa4ioI= cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= @@ -871,19 +871,19 @@ github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgI github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.37.27/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.45.1 h1:PXuxDZIo/Y9Bvtg2t055+dY4hRwNAEcq6bUMv9fXcjk= github.com/aws/aws-sdk-go v1.45.1/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/bbalet/stopwords v1.0.0 h1:0TnGycCtY0zZi4ltKoOGRFIlZHv0WqpoIGUsObjztfo= github.com/bbalet/stopwords v1.0.0/go.mod h1:sAWrQoDMfqARGIn4s6dp7OW7ISrshUD8IP2q3KoqPjc= github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= -github.com/beevik/etree v1.2.0 h1:l7WETslUG/T+xOPs47dtd6jov2Ii/8/OjCldk5fYfQw= -github.com/beevik/etree v1.2.0/go.mod h1:aiPf89g/1k3AShMVAzriilpcE4R/Vuor90y83zVZWFc= +github.com/beevik/etree v1.3.0 h1:hQTc+pylzIKDb23yYprodCWWTt+ojFfUZyzU09a/hmU= +github.com/beevik/etree v1.3.0/go.mod h1:aiPf89g/1k3AShMVAzriilpcE4R/Vuor90y83zVZWFc= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= +github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -940,6 +940,8 @@ github.com/bombsimon/logrusr/v3 v3.1.0/go.mod h1:PksPPgSFEL2I52pla2glgCyyd2OqOHA github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/bytecodealliance/wasmtime-go/v3 v3.0.2 h1:3uZCA/BLTIu+DqCfguByNMJa2HVHpXvjfy0Dy7g6fuA= github.com/bytecodealliance/wasmtime-go/v3 v3.0.2/go.mod h1:RnUjnIXxEJcL6BgCvNyzCCRzZcxCgsZCi+RNlvYor5Q= @@ -989,14 +991,12 @@ github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20231109132714-523115ebc101 h1:7To3pQ+pZo0i3dsWEbinPNFs5gPSBOsJtx3wTT94VBY= -github.com/cncf/xds/go v0.0.0-20231109132714-523115ebc101/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0= github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk= -github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-oidc/v3 v3.9.0 h1:0J/ogVOd4y8P0f0xUh8l9t07xRP/d8tccvjHl2dcsSo= github.com/coreos/go-oidc/v3 v3.9.0/go.mod h1:rTKz2PYwftcrtoCzV5g5kvfJoWcm0Mk8AF8y1iAQro4= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= @@ -1019,8 +1019,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-20231023073225-7748710e0781 h1:BUdwkIlf8IS2FasrrPg8gGPHQPOrQ18MS1Oew2tmGtY= github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= -github.com/cs3org/reva/v2 v2.18.1-0.20240208105019-d5e420d294be h1:vljLn7q9NPfiynhzGBRD1sv8qhYGd6SZOHgvzv+Q9iA= -github.com/cs3org/reva/v2 v2.18.1-0.20240208105019-d5e420d294be/go.mod h1:GCN3g6uYE0Nvd31dGlhaGGyUviUfbG2NkecPRv5oSc4= +github.com/cs3org/reva/v2 v2.19.0 h1:um4gDUlXmq/lq2u38LbfIAts+ixnSTa65bp6yv3IQrI= +github.com/cs3org/reva/v2 v2.19.0/go.mod h1:GRUrOp5HbFVwZTgR9bVrMZ/MvVy+Jhxw1PdMmhhKP9E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= @@ -1071,8 +1071,8 @@ github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcej github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/emvi/iso-639-1 v1.0.1 h1:4s6P8Uxc/RDkwCpxAr4NHOT/15a1swy9IQkB8PJCWVI= -github.com/emvi/iso-639-1 v1.0.1/go.mod h1:mghC4MDFyszxzH98ujf/K5whvB6B0nV4qCa5u94dP84= +github.com/emvi/iso-639-1 v1.1.0 h1:EhZiYVA+ysa/b7+0T2DD9hcX7E/5sh4o1KyDAIPu7VE= +github.com/emvi/iso-639-1 v1.1.0/go.mod h1:CSA53/Tx0xF9bk2DEA0Mr0wTdIxq7pqoVZgBOfoL5GI= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -1090,8 +1090,8 @@ github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/evanphx/json-patch/v5 v5.5.0 h1:bAmFiUJ+o0o2B4OiTFeE3MqCOtyo+jjPP9iZ0VRxYUc= github.com/evanphx/json-patch/v5 v5.5.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/exoscale/egoscale v0.46.0/go.mod h1:mpEXBpROAa/2i5GC0r33rfxG+TxSEka11g1PIXt9+zc= @@ -1138,8 +1138,8 @@ github.com/go-asn1-ber/asn1-ber v1.5.5 h1:MNHlNMBDgEKD4TcKr36vQN68BA00aDfjIt3/bD github.com/go-asn1-ber/asn1-ber v1.5.5/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= -github.com/go-chi/chi/v5 v5.0.11 h1:BnpYbFZ3T3S1WMpD79r7R5ThWX40TaFB7L31Y8xqSwA= -github.com/go-chi/chi/v5 v5.0.11/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s= +github.com/go-chi/chi/v5 v5.0.12/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-chi/cors v1.2.1 h1:xEC8UT3Rlp2QuWNEr4Fs/c2EAGVKBwy/1vHx3bppil4= github.com/go-chi/cors v1.2.1/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58= github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4= @@ -1216,8 +1216,8 @@ github.com/go-micro/plugins/v4/server/http v1.2.2 h1:UK2/09AU0zV3wHELuR72TZzVU2v github.com/go-micro/plugins/v4/server/http v1.2.2/go.mod h1:YuAjaSPxcn3LI8j2FUsqx0Rxunrj4YwDV41Ax76rLl0= github.com/go-micro/plugins/v4/store/nats-js v1.2.1-0.20231129143103-d72facc652f0 h1:Qa1EBQ9UyCGecFAJQovl/MHGnvbcvDaM3qUoAG5Lnvk= github.com/go-micro/plugins/v4/store/nats-js v1.2.1-0.20231129143103-d72facc652f0/go.mod h1:aCRl8JQmqIaonOl88nFPY/BOQnHPVHY9ngStzLkXnYk= -github.com/go-micro/plugins/v4/store/redis v1.2.1-0.20230510195111-07cd57e1bc9d h1:HQoDDVyMfdkrgXNo03ZY4vzhoOXMDZVZ4SnpBDVID6E= -github.com/go-micro/plugins/v4/store/redis v1.2.1-0.20230510195111-07cd57e1bc9d/go.mod h1:MbCG0YiyPqETTtm7uHFmxQNCaW1o9hBoYtFwhbVjLUg= +github.com/go-micro/plugins/v4/store/redis v1.2.1 h1:d9kwr9bSpoK9vkHkqcv+isQUbgBCHpfwCV57pcAPS6c= +github.com/go-micro/plugins/v4/store/redis v1.2.1/go.mod h1:MbCG0YiyPqETTtm7uHFmxQNCaW1o9hBoYtFwhbVjLUg= github.com/go-micro/plugins/v4/transport/grpc v1.1.0 h1:mXfDYfFQLnVDzjGY3o84oe4prfux9h8txsnA19dKsj8= github.com/go-micro/plugins/v4/transport/grpc v1.1.0/go.mod h1:J5xMp70xXZzm8yafICrDrWaUDd8Gwy8vt0xif7NcOPg= github.com/go-micro/plugins/v4/wrapper/breaker/gobreaker v1.2.0 h1:EQj4l7fuOSz8ueUYhFlpZPp9+tN4JeONL32ARRKXW/U= @@ -1243,8 +1243,8 @@ github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= -github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= +github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= @@ -1290,8 +1290,8 @@ github.com/golang/geo v0.0.0-20210211234256-740aa86cb551/go.mod h1:QZ0nwyI2jOfgR github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -1474,8 +1474,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.3.1 h1:vDwF1DFNZhntP4DAjuTpOw3uEgMUpXh1pB5fW9DqHpo= -github.com/hashicorp/go-hclog v1.3.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I= +github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= @@ -1488,8 +1488,8 @@ github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHh github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.5 h1:oTE/oQR4eghggRg8VY7PAz3dr++VwDNBGCcOfIvHpBo= -github.com/hashicorp/go-plugin v1.4.5/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= +github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= +github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= @@ -1523,13 +1523,14 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/serf v0.10.0 h1:89qvvpfMQnz6c2y4pv7j2vUUmeT1+5TSZMexuTbtsPs= github.com/hashicorp/serf v0.10.0/go.mod h1:bXN03oZc5xlH46k/K1qTrpXb9ERKyY1/i/N5mxvgrZw= -github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 h1:xixZ2bWeofWV68J+x6AzmKuVM/JWCQwkWm6GW/MUR6I= -github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= -github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= +github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= +github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhKWFeDesPjMj+wCHReeknARU3wqlyN4= @@ -1544,11 +1545,11 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jellydator/ttlcache/v2 v2.11.1 h1:AZGME43Eh2Vv3giG6GeqeLeFXxwxn1/qHItqWZl6U64= github.com/jellydator/ttlcache/v2 v2.11.1/go.mod h1:RtE5Snf0/57e+2cLWFYWCCsLas2Hy3c5Z4n14XmSvTI= -github.com/jellydator/ttlcache/v3 v3.1.1 h1:RCgYJqo3jgvhl+fEWvjNW8thxGWsgxi+TPhRir1Y9y8= -github.com/jellydator/ttlcache/v3 v3.1.1/go.mod h1:hi7MGFdMAwZna5n2tuvh63DvFLzVKySzCVW6+0gA2n4= +github.com/jellydator/ttlcache/v3 v3.2.0 h1:6lqVJ8X3ZaUwvzENqPAobDsXNExfUJd61u++uW8a3LE= +github.com/jellydator/ttlcache/v3 v3.2.0/go.mod h1:hi7MGFdMAwZna5n2tuvh63DvFLzVKySzCVW6+0gA2n4= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= -github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= +github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -1591,10 +1592,9 @@ github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHU github.com/klauspost/compress v1.17.5 h1:d4vBd+7CHydUqpFBgUEKkSdtSugf9YFmSkvUYPquI5E= github.com/klauspost/compress v1.17.5/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0= -github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= +github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/kobergj/plugins/v4/store/nats-js-kv v0.0.0-20231207143248-4d424e3ae348 h1:Czv6AW9Suj6npWd5BLZjobdD78c2RdzBeKBgkq3jYZk= github.com/kobergj/plugins/v4/store/nats-js-kv v0.0.0-20231207143248-4d424e3ae348/go.mod h1:Goi4eJ9SrKkxE6NsAVqBVNxfQFbwb7UbyII6743ldgM= github.com/kolo/xmlrpc v0.0.0-20200310150728-e0350524596b/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ= @@ -1623,8 +1623,8 @@ github.com/leonelquinteros/gotext v1.5.3-0.20230317130943-71a59c05b2c1 h1:k56sFO github.com/leonelquinteros/gotext v1.5.3-0.20230317130943-71a59c05b2c1/go.mod h1:AT4NpQrOmyj1L/+hLja6aR0lk81yYYL4ePnj2kp7d6M= github.com/libregraph/idm v0.4.1-0.20231213140724-56a222fb4215 h1:Yw/I6l/0S/zDq2Hnibvwy8cVLpMaBwDe0aUSv/FNU6U= github.com/libregraph/idm v0.4.1-0.20231213140724-56a222fb4215/go.mod h1:h/B7mB5OqrsrobydErMGewHxonYDKjGOaJsFabXyRo8= -github.com/libregraph/lico v0.61.1 h1:md5z939Fq3pUuRWNA0M2y8F7xel+XWgp9vCXwMih8mQ= -github.com/libregraph/lico v0.61.1/go.mod h1:pnRet4pexWmy6rAB2fLAlEU885ShDIJhbjbuekDSlMU= +github.com/libregraph/lico v0.61.2 h1:sU8eQ2E9Uq5wnTkD33YX5+gRj59MkPLgDVoB72L1q8w= +github.com/libregraph/lico v0.61.2/go.mod h1:TgZGBAYzVRQSRdBC8PgGQKjYhtXuTr6UCM3ZZyGTleQ= github.com/libregraph/oidc-go v1.0.0 h1:l2tE/EwLyLXVy0B5BuVKgIFX9pNpz/5J3x5IBw0KEhc= github.com/libregraph/oidc-go v1.0.0/go.mod h1:7TRHrY/H1Vg6JqFjV0oAe1+kN+mGFBqXYvclSyvhRyc= github.com/linode/linodego v0.25.3/go.mod h1:GSBKPpjoQfxEfryoCRcgkuUOCuVtGHWhzI8OMdycNTE= @@ -1673,8 +1673,8 @@ github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4 github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= -github.com/mattn/go-sqlite3 v1.14.19 h1:fhGleo2h1p8tVChob4I9HpmVFIAkKGpiukdrgQbWfGI= -github.com/mattn/go-sqlite3 v1.14.19/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= +github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/mattn/go-tty v0.0.3/go.mod h1:ihxohKRERHTVzN+aSVRwACLCeqIoZAWpoICkkvrWyR0= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -1691,18 +1691,18 @@ github.com/miekg/dns v1.1.40/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7 github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= -github.com/mileusna/useragent v1.2.1 h1:p3RJWhi3LfuI6BHdddojREyK3p6qX67vIfOVMnUIVr0= -github.com/mileusna/useragent v1.2.1/go.mod h1:3d8TOmwL/5I8pJjyVDteHtgDGcefrFUX4ccGOMKNYYc= +github.com/mileusna/useragent v1.3.4 h1:MiuRRuvGjEie1+yZHO88UBYg8YBC/ddF6T7F56i3PCk= +github.com/mileusna/useragent v1.3.4/go.mod h1:3d8TOmwL/5I8pJjyVDteHtgDGcefrFUX4ccGOMKNYYc= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.42 h1:fP56plNR/Tkw/+Xczw9NL5TGxe5gJDvgd8LidNR3BEI= -github.com/minio/minio-go/v7 v7.0.42/go.mod h1:nCrRzjoSUQh8hgKKtu3Y708OLvRLtuASMg2/nvmbarw= -github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= -github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= +github.com/minio/minio-go/v7 v7.0.66 h1:bnTOXOHjOqv/gcMuiVbN9o2ngRItvqE774dG9nq0Dzw= +github.com/minio/minio-go/v7 v7.0.66/go.mod h1:DHAgmyQEGdW3Cif0UooKOyrT3Vxs82zNdV6tkKhRtbs= +github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= +github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -1747,8 +1747,8 @@ github.com/nats-io/jwt/v2 v2.5.3 h1:/9SWvzc6hTfamcgXJ3uYRpgj+QuY2aLNqRiqrKcrpEo= github.com/nats-io/jwt/v2 v2.5.3/go.mod h1:iysuPemFcc7p4IoYots3IuELSI4EDe9Y0bQMe+I3Bf4= github.com/nats-io/nats-server/v2 v2.10.10 h1:g1Wd64J5SGsoqWSx1qoNu9/At7a2x+jE7Qtf2XpEx/I= github.com/nats-io/nats-server/v2 v2.10.10/go.mod h1:/TE61Dos8NlwZnjzyE3ZlOnM6dgl7tf937dnf4VclrA= -github.com/nats-io/nats.go v1.32.0 h1:Bx9BZS+aXYlxW08k8Gd3yR2s73pV5XSoAQUyp1Kwvp0= -github.com/nats-io/nats.go v1.32.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= +github.com/nats-io/nats.go v1.33.1 h1:8TxLZZ/seeEfR97qV0/Bl939tpDnt2Z2fK3HkPypj70= +github.com/nats-io/nats.go v1.33.1/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= @@ -1830,8 +1830,8 @@ github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prY github.com/pquerna/cachecontrol v0.1.0 h1:yJMy84ti9h/+OEWa752kBTKv4XC30OtVVHYv/8cTqKc= github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= github.com/pquerna/otp v1.3.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= -github.com/prometheus/alertmanager v0.25.1 h1:LGBNMspOfv8h7brb+LWj2wnwBCg2ZuuKWTh6CAVw2/Y= -github.com/prometheus/alertmanager v0.25.1/go.mod h1:MEZ3rFVHqKZsw7IcNS/m4AWZeXThmJhumpiWR4eHU/w= +github.com/prometheus/alertmanager v0.26.0 h1:uOMJWfIwJguc3NaM3appWNbbrh6G/OjvaHMk22aBBYc= +github.com/prometheus/alertmanager v0.26.0/go.mod h1:rVcnARltVjavgVaNnmevxK7kOn7IZavyf0KNgHkbEpU= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -2008,12 +2008,12 @@ github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BG github.com/tchap/go-patricia/v2 v2.3.1/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k= github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= -github.com/thanhpk/randstr v1.0.4 h1:IN78qu/bR+My+gHCvMEXhR/i5oriVHcTB/BJJIRTsNo= -github.com/thanhpk/randstr v1.0.4/go.mod h1:M/H2P1eNLZzlDwAzpkkkUvoyNNMbzRGhESZuEQk3r0U= +github.com/thanhpk/randstr v1.0.6 h1:psAOktJFD4vV9NEVb3qkhRSMvYh4ORRaj1+w/hn4B+o= +github.com/thanhpk/randstr v1.0.6/go.mod h1:M/H2P1eNLZzlDwAzpkkkUvoyNNMbzRGhESZuEQk3r0U= github.com/thejerf/suture/v4 v4.0.2 h1:VxIH/J8uYvqJY1+9fxi5GBfGRkRZ/jlSOP6x9HijFQc= github.com/thejerf/suture/v4 v4.0.2/go.mod h1:g0e8vwskm9tI0jRjxrnA6lSr0q6OfPdWJVX7G5bVWRs= -github.com/tidwall/gjson v1.17.0 h1:/Jocvlh98kcTfpN2+JzGQWQcqrPQwDrVEMApx/M5ZwM= -github.com/tidwall/gjson v1.17.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= +github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= @@ -2068,17 +2068,17 @@ github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= -go-micro.dev/v4 v4.9.0 h1:pd1CpqMT9hA47jSmX8mfdGK865PkMh95Rwj5RdfqPqE= -go-micro.dev/v4 v4.9.0/go.mod h1:Ju8HrZ5hQSF+QguZ2QUs9Kbe42MHP1tJa/fpP5g07Cs= +go-micro.dev/v4 v4.10.2 h1:GWQf1+FcAiMf1yca3P09RNjB31Xtk0C5HiKHSpq/2qA= +go-micro.dev/v4 v4.10.2/go.mod h1:RV2AolXjTAil9Xm82QCMo1gknuZwD61oMUH14wJpECk= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/etcd/api/v3 v3.5.7 h1:sbcmosSVesNrWOJ58ZQFitHMdncusIifYcrBfwrlJSY= -go.etcd.io/etcd/api/v3 v3.5.7/go.mod h1:9qew1gCdDDLu+VwmeG+iFpL+QlpHTo7iubavdVDgCAA= -go.etcd.io/etcd/client/pkg/v3 v3.5.7 h1:y3kf5Gbp4e4q7egZdn5T7W9TSHUvkClN6u+Rq9mEOmg= -go.etcd.io/etcd/client/pkg/v3 v3.5.7/go.mod h1:o0Abi1MK86iad3YrWhgUsbGx1pmTS+hrORWc2CamuhY= -go.etcd.io/etcd/client/v3 v3.5.7 h1:u/OhpiuCgYY8awOHlhIhmGIGpxfBU/GZBUP3m/3/Iz4= -go.etcd.io/etcd/client/v3 v3.5.7/go.mod h1:sOWmj9DZUMyAngS7QQwCyAXXAL6WhgTOPLNS/NabQgw= +go.etcd.io/etcd/api/v3 v3.5.12 h1:W4sw5ZoU2Juc9gBWuLk5U6fHfNVyY1WC5g9uiXZio/c= +go.etcd.io/etcd/api/v3 v3.5.12/go.mod h1:Ot+o0SWSyT6uHhA56al1oCED0JImsRiU9Dc26+C2a+4= +go.etcd.io/etcd/client/pkg/v3 v3.5.12 h1:EYDL6pWwyOsylrQyLp2w+HkQ46ATiOvoEdMarindU2A= +go.etcd.io/etcd/client/pkg/v3 v3.5.12/go.mod h1:seTzl2d9APP8R5Y2hFL3NVlD6qC/dOT+3kvrqPyTas4= +go.etcd.io/etcd/client/v3 v3.5.12 h1:v5lCPXn1pf1Uu3M4laUE2hp/geOTc5uPcYYsNe1lDxg= +go.etcd.io/etcd/client/v3 v3.5.12/go.mod h1:tSbBCakoWmmddL+BKVAJHa9km+O/E+bumDe9mSbPiqw= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -2092,8 +2092,8 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib v1.0.0 h1:khwDCxdSspjOLmFnvMuSHd/5rPzbTx0+l6aURwtQdfE= go.opentelemetry.io/contrib v1.0.0/go.mod h1:EH4yDYeNoaTqn/8yCWQmfNB78VHfGX2Jt2bvnvzBlGM= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 h1:P+/g8GpuJGYbOp2tAdKrIPUX9JO02q8Q0YNlHolpibA= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0/go.mod h1:tIKj3DbO8N9Y2xo52og3irLsPI4GW02DSMtrVgNMgxg= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 h1:doUP+ExOpH3spVTLS0FcWGLnQrPct/hD/bCPbDRUEAU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0/go.mod h1:rdENBZMT2OE6Ne/KLwpiXudnAsbdrdBaqBvTN8M8BgA= go.opentelemetry.io/contrib/zpages v0.48.0 h1:7vnqarYRu2VYvUUwrLWXRk5HqPuCbtuZdgR4eaVeP3Y= @@ -2123,8 +2123,8 @@ go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7e go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= @@ -2186,8 +2186,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -2477,7 +2477,6 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2626,8 +2625,8 @@ golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= -golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2862,8 +2861,8 @@ google.golang.org/genproto v0.0.0-20230629202037-9506855d4529/go.mod h1:xZnkP7mR google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108= google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= -google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac h1:ZL/Teoy/ZGnzyrqK/Optxxp2pmVh+fmJ97slxSRyzUg= -google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= +google.golang.org/genproto v0.0.0-20240205150955-31a09d347014 h1:g/4bk7P6TPMkAUbUhquq98xey1slwvuVJPosdBqYJlU= +google.golang.org/genproto v0.0.0-20240205150955-31a09d347014/go.mod h1:xEgQu1e4stdSSsxPDK8Azkrk/ECl5HvdPf6nbZrTS5M= google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= @@ -2935,8 +2934,8 @@ google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGO google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= -google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= -google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/examples v0.0.0-20211102180624-670c133e568e h1:m7aQHHqd0q89mRwhwS9Bx2rjyl/hsFAeta+uGrHsQaU= google.golang.org/grpc/examples v0.0.0-20211102180624-670c133e568e/go.mod h1:gID3PKrg7pWKntu9Ss6zTLJ0ttC0X9IHgREOCZwbCVU= diff --git a/ocis-pkg/service/grpc/client.go b/ocis-pkg/service/grpc/client.go index f8e857882e..06b8649d33 100644 --- a/ocis-pkg/service/grpc/client.go +++ b/ocis-pkg/service/grpc/client.go @@ -13,6 +13,7 @@ import ( "github.com/owncloud/ocis/v2/ocis-pkg/shared" "go-micro.dev/v4/client" "go.opentelemetry.io/otel/trace" + "go.opentelemetry.io/otel/trace/noop" ) // ClientOptions represent options (e.g. tls settings) for the grpc clients @@ -45,7 +46,7 @@ func WithTraceProvider(tp trace.TracerProvider) ClientOption { if tp != nil { o.tp = tp } else { - o.tp = trace.NewNoopTracerProvider() + o.tp = noop.NewTracerProvider() } } } diff --git a/ocis/pkg/command/migrate.go b/ocis/pkg/command/migrate.go index 7c16f207c3..319cc83500 100644 --- a/ocis/pkg/command/migrate.go +++ b/ocis/pkg/command/migrate.go @@ -308,7 +308,7 @@ func MigrateShares(cfg *config.Config) *cli.Command { }, &cli.StringFlag{ Name: "to", - Value: "cs3", + Value: "jsoncs3", Usage: "Share manager to import the data into", }, }, @@ -403,7 +403,7 @@ func MigratePublicShares(cfg *config.Config) *cli.Command { }, &cli.StringFlag{ Name: "to", - Value: "cs3", + Value: "jsoncs3", Usage: "Public share manager to import the data into", }, }, diff --git a/services/graph/pkg/service/v0/sharedwithme.go b/services/graph/pkg/service/v0/sharedwithme.go index 261de483c3..247ce0d158 100644 --- a/services/graph/pkg/service/v0/sharedwithme.go +++ b/services/graph/pkg/service/v0/sharedwithme.go @@ -92,7 +92,6 @@ func (g Graph) cs3ReceivedSharesToDriveItems(ctx context.Context, receivedShares group.Go(func() error { var err error // redeclare - resourceID := receivedShares[0].GetShare().GetResourceId() shareStat, err := doStat(receivedShares[0].GetShare().GetResourceId()) if shareStat == nil || err != nil { return err @@ -100,17 +99,17 @@ func (g Graph) cs3ReceivedSharesToDriveItems(ctx context.Context, receivedShares driveItem := libregraph.NewDriveItem() - // The id of the driveItem will be the composed of the StorageID and the SpaceID of the sharestorage - // appended with the ResourceID of the shared resource - // '$!::' - driveItem.SetId(storagespace.FormatResourceID(storageprovider.ResourceId{ - StorageId: utils.ShareStorageProviderID, - OpaqueId: resourceID.GetStorageId() + ":" + resourceID.GetSpaceId() + ":" + resourceID.GetOpaqueId(), - SpaceId: utils.ShareStorageSpaceID, - })) permissions := make([]libregraph.Permission, 0, len(receivedShares)) + var oldestReceivedShare *collaboration.ReceivedShare for _, receivedShare := range receivedShares { + switch { + case oldestReceivedShare == nil: + fallthrough + case utils.TSToTime(receivedShare.GetShare().GetCtime()).Before(utils.TSToTime(oldestReceivedShare.GetShare().GetCtime())): + oldestReceivedShare = receivedShare + } + permission, err := g.cs3ReceivedShareToLibreGraphPermissions(ctx, receivedShare) if err != nil { return err @@ -150,6 +149,23 @@ func (g Graph) cs3ReceivedSharesToDriveItems(ctx context.Context, receivedShares } + // To stay compatible with the usershareprovider and the webdav + // service the id of the driveItem is composed of the StorageID and + // SpaceID of the sharestorage appended with the opaque ID of + // the oldest share for the resource: + // '$! + // Note: This means that the driveitem ID will change when the oldest + // shared is removed. It would be good to have are more stable ID here (e.g. + // derived from the shared resource's ID. But as we need to use the same + // ID across all services this means we needed to make similar adjustments + // to the sharejail (usershareprovider, webdav). Which we can't currently do + // as some clients rely on the IDs used there having a special format. + driveItem.SetId(storagespace.FormatResourceID(storageprovider.ResourceId{ + StorageId: utils.ShareStorageProviderID, + OpaqueId: oldestReceivedShare.GetShare().GetId().GetOpaqueId(), + SpaceId: utils.ShareStorageSpaceID, + })) + if !driveItem.HasUIHidden() { driveItem.SetUIHidden(false) } diff --git a/services/graph/pkg/service/v0/sharedwithme_test.go b/services/graph/pkg/service/v0/sharedwithme_test.go index 7ba445f90d..3084cf4936 100644 --- a/services/graph/pkg/service/v0/sharedwithme_test.go +++ b/services/graph/pkg/service/v0/sharedwithme_test.go @@ -158,6 +158,7 @@ var _ = Describe("SharedWithMe", func() { Permissions: roleconversions.NewViewerRole(true).CS3ResourcePermissions(), }, Creator: getUserResponseShareCreator.User.Id, + Ctime: utils.TSNow(), }, MountPoint: &providerv1beta1.Reference{ ResourceId: &providerv1beta1.ResourceId{ @@ -213,6 +214,7 @@ var _ = Describe("SharedWithMe", func() { Hidden: true, Share: &collaborationv1beta1.Share{ ResourceId: toResourceID("7$8!9"), + Ctime: utils.TSNow(), }, }) @@ -405,6 +407,7 @@ var _ = Describe("SharedWithMe", func() { Permissions: roleconversions.NewViewerRole(true).CS3ResourcePermissions(), }, Creator: getUserResponseShareCreator.User.Id, + Ctime: utils.TSNow(), Grantee: &providerv1beta1.Grantee{ Type: providerv1beta1.GranteeType_GRANTEE_TYPE_GROUP, Id: &providerv1beta1.Grantee_GroupId{ diff --git a/services/notifications/pkg/email/l10n/locale/ca/LC_MESSAGES/notifications.po b/services/notifications/pkg/email/l10n/locale/ca/LC_MESSAGES/notifications.po index b5143cb9b7..3943b8edd4 100644 --- a/services/notifications/pkg/email/l10n/locale/ca/LC_MESSAGES/notifications.po +++ b/services/notifications/pkg/email/l10n/locale/ca/LC_MESSAGES/notifications.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" -"POT-Creation-Date: 2024-01-30 00:34+0000\n" +"POT-Creation-Date: 2024-02-19 04:30+0000\n" "PO-Revision-Date: 2023-04-19 11:11+0000\n" "Last-Translator: Arnau Morancho, 2023\n" "Language-Team: Catalan (https://app.transifex.com/owncloud-org/teams/6149/ca/)\n" diff --git a/services/notifications/pkg/email/l10n/locale/en_GB/LC_MESSAGES/notifications.po b/services/notifications/pkg/email/l10n/locale/en_GB/LC_MESSAGES/notifications.po index 12befb8e6a..2a44965f32 100644 --- a/services/notifications/pkg/email/l10n/locale/en_GB/LC_MESSAGES/notifications.po +++ b/services/notifications/pkg/email/l10n/locale/en_GB/LC_MESSAGES/notifications.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" -"POT-Creation-Date: 2024-01-30 00:34+0000\n" +"POT-Creation-Date: 2024-02-19 04:30+0000\n" "PO-Revision-Date: 2023-04-19 11:11+0000\n" "Last-Translator: Andi Chandler , 2023\n" "Language-Team: English (United Kingdom) (https://app.transifex.com/owncloud-org/teams/6149/en_GB/)\n" diff --git a/services/notifications/pkg/email/l10n/locale/es/LC_MESSAGES/notifications.po b/services/notifications/pkg/email/l10n/locale/es/LC_MESSAGES/notifications.po index 95abb696d0..e806da5e4d 100644 --- a/services/notifications/pkg/email/l10n/locale/es/LC_MESSAGES/notifications.po +++ b/services/notifications/pkg/email/l10n/locale/es/LC_MESSAGES/notifications.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" -"POT-Creation-Date: 2024-01-30 00:34+0000\n" +"POT-Creation-Date: 2024-02-19 04:30+0000\n" "PO-Revision-Date: 2023-04-19 11:11+0000\n" "Last-Translator: Juan Carlos Garrote, 2023\n" "Language-Team: Spanish (https://app.transifex.com/owncloud-org/teams/6149/es/)\n" diff --git a/services/notifications/pkg/email/l10n/locale/ko/LC_MESSAGES/notifications.po b/services/notifications/pkg/email/l10n/locale/ko/LC_MESSAGES/notifications.po index 2bc2ce7fac..7d5b94b23f 100644 --- a/services/notifications/pkg/email/l10n/locale/ko/LC_MESSAGES/notifications.po +++ b/services/notifications/pkg/email/l10n/locale/ko/LC_MESSAGES/notifications.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" -"POT-Creation-Date: 2024-01-30 00:34+0000\n" +"POT-Creation-Date: 2024-02-19 04:30+0000\n" "PO-Revision-Date: 2023-04-19 11:11+0000\n" "Last-Translator: Hugo Blackwood, 2023\n" "Language-Team: Korean (https://app.transifex.com/owncloud-org/teams/6149/ko/)\n" diff --git a/services/notifications/pkg/email/l10n/locale/pt_BR/LC_MESSAGES/notifications.po b/services/notifications/pkg/email/l10n/locale/pt_BR/LC_MESSAGES/notifications.po index 0ee3091b34..a6f7ebf890 100644 --- a/services/notifications/pkg/email/l10n/locale/pt_BR/LC_MESSAGES/notifications.po +++ b/services/notifications/pkg/email/l10n/locale/pt_BR/LC_MESSAGES/notifications.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" -"POT-Creation-Date: 2024-01-30 00:34+0000\n" +"POT-Creation-Date: 2024-02-19 04:30+0000\n" "PO-Revision-Date: 2023-04-19 11:11+0000\n" "Last-Translator: Flávio Veras , 2023\n" "Language-Team: Portuguese (Brazil) (https://app.transifex.com/owncloud-org/teams/6149/pt_BR/)\n" diff --git a/services/notifications/pkg/email/l10n/locale/ru/LC_MESSAGES/notifications.po b/services/notifications/pkg/email/l10n/locale/ru/LC_MESSAGES/notifications.po index ab304472f7..ff7c1a7f5d 100644 --- a/services/notifications/pkg/email/l10n/locale/ru/LC_MESSAGES/notifications.po +++ b/services/notifications/pkg/email/l10n/locale/ru/LC_MESSAGES/notifications.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" -"POT-Creation-Date: 2024-01-30 00:34+0000\n" +"POT-Creation-Date: 2024-02-19 04:30+0000\n" "PO-Revision-Date: 2023-04-19 11:11+0000\n" "Last-Translator: Roman Perekhod, 2023\n" "Language-Team: Russian (https://app.transifex.com/owncloud-org/teams/6149/ru/)\n" diff --git a/services/notifications/pkg/email/l10n/locale/sq/LC_MESSAGES/notifications.po b/services/notifications/pkg/email/l10n/locale/sq/LC_MESSAGES/notifications.po index 88b43d8811..8c306b440c 100644 --- a/services/notifications/pkg/email/l10n/locale/sq/LC_MESSAGES/notifications.po +++ b/services/notifications/pkg/email/l10n/locale/sq/LC_MESSAGES/notifications.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" -"POT-Creation-Date: 2024-02-02 01:09+0000\n" +"POT-Creation-Date: 2024-02-22 03:57+0000\n" "PO-Revision-Date: 2023-04-19 11:11+0000\n" "Last-Translator: Besnik Bleta , 2024\n" "Language-Team: Albanian (https://app.transifex.com/owncloud-org/teams/6149/sq/)\n" diff --git a/services/notifications/pkg/email/l10n/locale/tr/LC_MESSAGES/notifications.po b/services/notifications/pkg/email/l10n/locale/tr/LC_MESSAGES/notifications.po index 537615b17c..445a465c6d 100644 --- a/services/notifications/pkg/email/l10n/locale/tr/LC_MESSAGES/notifications.po +++ b/services/notifications/pkg/email/l10n/locale/tr/LC_MESSAGES/notifications.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" -"POT-Creation-Date: 2024-02-03 00:35+0000\n" +"POT-Creation-Date: 2024-02-23 00:46+0000\n" "PO-Revision-Date: 2023-04-19 11:11+0000\n" "Last-Translator: Begüm Topyıldız , 2023\n" "Language-Team: Turkish (https://app.transifex.com/owncloud-org/teams/6149/tr/)\n" diff --git a/services/sharing/pkg/config/config.go b/services/sharing/pkg/config/config.go index f7fc47b6d7..1e3a7fb33e 100644 --- a/services/sharing/pkg/config/config.go +++ b/services/sharing/pkg/config/config.go @@ -21,9 +21,11 @@ type Config struct { SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"SHARING_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` - UserSharingDriver string `yaml:"user_sharing_driver" env:"SHARING_USER_DRIVER" desc:"Driver to be used to persist shares. Supported values are 'jsoncs3', 'json', 'cs3' and 'owncloudsql'."` + EnableResharing bool `yaml:"enable_resharing" env:"OCIS_ENABLE_RESHARING;SHARING_ENABLE_RESHARING" desc:"Changing this value is NOT supported. Enables the support for resharing."` + + UserSharingDriver string `yaml:"user_sharing_driver" env:"SHARING_USER_DRIVER" desc:"Driver to be used to persist shares. Supported values are 'jsoncs3', 'json', 'cs3' (deprecated) and 'owncloudsql'."` UserSharingDrivers UserSharingDrivers `yaml:"user_sharing_drivers"` - PublicSharingDriver string `yaml:"public_sharing_driver" env:"SHARING_PUBLIC_DRIVER" desc:"Driver to be used to persist public shares. Supported values are 'jsoncs3', 'json' and 'cs3'."` + PublicSharingDriver string `yaml:"public_sharing_driver" env:"SHARING_PUBLIC_DRIVER" desc:"Driver to be used to persist public shares. Supported values are 'jsoncs3', 'json' and 'cs3' (deprecated)."` PublicSharingDrivers PublicSharingDrivers `yaml:"public_sharing_drivers"` WriteableShareMustHavePassword bool `yaml:"public_sharing_writeableshare_must_have_password" env:"OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD;SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD" desc:"Set this to true if you want to enforce passwords on Uploader, Editor or Contributor shares. If not using the global OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD, you must define the FRONTEND_OCS_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD in the frontend service."` PublicShareMustHavePassword bool `yaml:"public_sharing_share_must_have_password" env:"OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD;SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" desc:"Set this to true if you want to enforce passwords on all public shares."` diff --git a/services/sharing/pkg/config/defaults/defaultconfig.go b/services/sharing/pkg/config/defaults/defaultconfig.go index 57026e0b9a..20d86a739a 100644 --- a/services/sharing/pkg/config/defaults/defaultconfig.go +++ b/services/sharing/pkg/config/defaults/defaultconfig.go @@ -35,6 +35,7 @@ func DefaultConfig() *config.Config { Name: "sharing", }, Reva: shared.DefaultRevaConfig(), + EnableResharing: true, UserSharingDriver: "jsoncs3", UserSharingDrivers: config.UserSharingDrivers{ JSON: config.UserSharingJSONDriver{ diff --git a/services/sharing/pkg/revaconfig/config.go b/services/sharing/pkg/revaconfig/config.go index 8f02b796de..d13427f2f0 100644 --- a/services/sharing/pkg/revaconfig/config.go +++ b/services/sharing/pkg/revaconfig/config.go @@ -86,6 +86,7 @@ func SharingConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string] }, }, }, + "disable_resharing": !cfg.EnableResharing, }, "publicshareprovider": map[string]interface{}{ "gateway_addr": cfg.Reva.Address, diff --git a/services/storage-users/pkg/config/config.go b/services/storage-users/pkg/config/config.go index 43cdaa61d8..0697ee7a58 100644 --- a/services/storage-users/pkg/config/config.go +++ b/services/storage-users/pkg/config/config.go @@ -84,6 +84,17 @@ type HTTPConfig struct { Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"STORAGE_USERS_HTTP_PROTOCOL" desc:"The transport protocol of the HTTP service."` Prefix string + CORS CORS `yaml:"cors"` +} + +// CORS defines the available cors configuration. +type CORS struct { + AllowedOrigins []string `yaml:"allow_origins" env:"OCIS_CORS_ALLOW_ORIGINS;STORAGE_USERS_CORS_ALLOW_ORIGINS" desc:"A list of allowed CORS origins. See following chapter for more details: *Access-Control-Allow-Origin* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin. See the Environment Variable Types description for more details."` + AllowedMethods []string `yaml:"allow_methods" env:"OCIS_CORS_ALLOW_METHODS;STORAGE_USERS_CORS_ALLOW_METHODS" desc:"A list of allowed CORS methods. See following chapter for more details: *Access-Control-Request-Method* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Method. See the Environment Variable Types description for more details."` + AllowedHeaders []string `yaml:"allow_headers" env:"OCIS_CORS_ALLOW_HEADERS;STORAGE_USERS_CORS_ALLOW_HEADERS" desc:"A list of allowed CORS headers. See following chapter for more details: *Access-Control-Request-Headers* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Headers. See the Environment Variable Types description for more details."` + AllowCredentials bool `yaml:"allow_credentials" env:"OCIS_CORS_ALLOW_CREDENTIALS;STORAGE_USERS_CORS_ALLOW_CREDENTIALS" desc:"Allow credentials for CORS.See following chapter for more details: *Access-Control-Allow-Credentials* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials."` + ExposedHeaders []string `yaml:"expose_headers" env:"OCIS_CORS_EXPOSE_HEADERS;STORAGE_USERS_CORS_EXPOSE_HEADERS" desc:"A list of exposed CORS headers. See following chapter for more details: *Access-Control-Expose-Headers* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers. See the Environment Variable Types description for more details."` + MaxAge uint `yaml:"max_age" env:"OCIS_CORS_MAX_AGE;STORAGE_USERS_CORS_MAX_AGE" desc:"The max cache duration of preflight headers. See following chapter for more details: *Access-Control-Max-Age* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age. See the Environment Variable Types description for more details."` } // Drivers combine all storage driver configurations @@ -132,14 +143,20 @@ type S3NGDriver struct { Propagator string `yaml:"propagator" env:"OCIS_DECOMPOSEDFS_PROPAGATOR;STORAGE_USERS_S3NG_PROPAGATOR" desc:"The propagator used for decomposedfs. At the moment, only 'sync' is fully supported, 'async' is available as an experimental option."` AsyncPropagatorOptions AsyncPropagatorOptions `yaml:"async_propagator_options"` // Root is the absolute path to the location of the data - Root string `yaml:"root" env:"STORAGE_USERS_S3NG_ROOT" desc:"The directory where the filesystem storage will store metadata for blobs. If not defined, the root directory derives from $OCIS_BASE_DATA_PATH:/storage/users."` - UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_S3NG_USER_LAYOUT" desc:"Template string for the user storage layout in the user directory."` - PermissionsEndpoint string `yaml:"permissions_endpoint" env:"STORAGE_USERS_PERMISSION_ENDPOINT;STORAGE_USERS_S3NG_PERMISSIONS_ENDPOINT" desc:"Endpoint of the permissions service. The endpoints can differ for 'ocis' and 's3ng'."` - Region string `yaml:"region" env:"STORAGE_USERS_S3NG_REGION" desc:"Region of the S3 bucket."` - AccessKey string `yaml:"access_key" env:"STORAGE_USERS_S3NG_ACCESS_KEY" desc:"Access key for the S3 bucket."` - SecretKey string `yaml:"secret_key" env:"STORAGE_USERS_S3NG_SECRET_KEY" desc:"Secret key for the S3 bucket."` - Endpoint string `yaml:"endpoint" env:"STORAGE_USERS_S3NG_ENDPOINT" desc:"Endpoint for the S3 bucket."` - Bucket string `yaml:"bucket" env:"STORAGE_USERS_S3NG_BUCKET" desc:"Name of the S3 bucket."` + Root string `yaml:"root" env:"STORAGE_USERS_S3NG_ROOT" desc:"The directory where the filesystem storage will store metadata for blobs. If not defined, the root directory derives from $OCIS_BASE_DATA_PATH:/storage/users."` + UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_S3NG_USER_LAYOUT" desc:"Template string for the user storage layout in the user directory."` + PermissionsEndpoint string `yaml:"permissions_endpoint" env:"STORAGE_USERS_PERMISSION_ENDPOINT;STORAGE_USERS_S3NG_PERMISSIONS_ENDPOINT" desc:"Endpoint of the permissions service. The endpoints can differ for 'ocis' and 's3ng'."` + Region string `yaml:"region" env:"STORAGE_USERS_S3NG_REGION" desc:"Region of the S3 bucket."` + AccessKey string `yaml:"access_key" env:"STORAGE_USERS_S3NG_ACCESS_KEY" desc:"Access key for the S3 bucket."` + SecretKey string `yaml:"secret_key" env:"STORAGE_USERS_S3NG_SECRET_KEY" desc:"Secret key for the S3 bucket."` + Endpoint string `yaml:"endpoint" env:"STORAGE_USERS_S3NG_ENDPOINT" desc:"Endpoint for the S3 bucket."` + Bucket string `yaml:"bucket" env:"STORAGE_USERS_S3NG_BUCKET" desc:"Name of the S3 bucket."` + DisableContentSha256 bool `yaml:"put_object_disable_content_sha254" env:"STORAGE_USERS_S3NG_PUT_OBJECT_DISABLE_CONTENT_SHA256" desc:"Disable sending content sha256 when copying objects to S3."` + DisableMultipart bool `yaml:"put_object_disable_multipart" env:"STORAGE_USERS_S3NG_PUT_OBJECT_DISABLE_MULTIPART" desc:"Disable multipart uploads when copying objects to S3"` + SendContentMd5 bool `yaml:"put_object_send_content_md5" env:"STORAGE_USERS_S3NG_PUT_OBJECT_SEND_CONTENT_MD5" desc:"Send a Content-MD5 header when copying objects to S3."` + ConcurrentStreamParts bool `yaml:"put_object_concurrent_stream_parts" env:"STORAGE_USERS_S3NG_PUT_OBJECT_CONCURRENT_STREAM_PARTS" desc:"Always precreate parts when copying objects to S3."` + NumThreads uint `yaml:"put_object_num_threads" env:"STORAGE_USERS_S3NG_PUT_OBJECT_NUM_THREADS" desc:"Number of concurrent uploads to use when copying objects to S3."` + PartSize uint64 `yaml:"put_object_part_size" env:"STORAGE_USERS_S3NG_PUT_OBJECT_PART_SIZE" desc:"Part size for concurrent uploads to S3."` // PersonalSpaceAliasTemplate contains the template used to construct // the personal space alias, eg: `"{{.SpaceType}}/{{.User.Username | lower}}"` PersonalSpaceAliasTemplate string `yaml:"personalspacealias_template" env:"STORAGE_USERS_S3NG_PERSONAL_SPACE_ALIAS_TEMPLATE" desc:"Template string to construct personal space aliases."` diff --git a/services/storage-users/pkg/config/defaults/defaultconfig.go b/services/storage-users/pkg/config/defaults/defaultconfig.go index 65510c8ec0..b615db8ba7 100644 --- a/services/storage-users/pkg/config/defaults/defaultconfig.go +++ b/services/storage-users/pkg/config/defaults/defaultconfig.go @@ -37,6 +37,49 @@ func DefaultConfig() *config.Config { Namespace: "com.owncloud.web", Protocol: "tcp", Prefix: "data", + CORS: config.CORS{ + AllowedOrigins: []string{"*"}, + AllowedMethods: []string{ + "POST", + "HEAD", + "PATCH", + "OPTIONS", + "GET", + "DELETE", + }, + AllowedHeaders: []string{ + "Authorization", + "Origin", + "X-Requested-With", + "X-Request-Id", + "X-HTTP-Method-Override", + "Content-Type", + "Upload-Length", + "Upload-Offset", + "Tus-Resumable", + "Upload-Metadata", + "Upload-Defer-Length", + "Upload-Concat", + "Upload-Incomplete", + "Upload-Draft-Interop-Version", + }, + AllowCredentials: true, + ExposedHeaders: []string{ + "Upload-Offset", + "Location", + "Upload-Length", + "Tus-Version", + "Tus-Resumable", + "Tus-Max-Size", + "Tus-Extension", + "Upload-Metadata", + "Upload-Defer-Length", + "Upload-Concat", + "Upload-Incomplete", + "Upload-Draft-Interop-Version", + }, + MaxAge: 86400, + }, }, Service: config.Service{ Name: "storage-users", @@ -69,6 +112,9 @@ func DefaultConfig() *config.Config { ShareFolder: "/Shares", UserLayout: "{{.Id.OpaqueId}}", Region: "default", + SendContentMd5: true, + ConcurrentStreamParts: true, + NumThreads: 4, PersonalSpaceAliasTemplate: "{{.SpaceType}}/{{.User.Username | lower}}", GeneralSpaceAliasTemplate: "{{.SpaceType}}/{{.SpaceName | replace \" \" \"-\" | lower}}", PermissionsEndpoint: "com.owncloud.api.settings", diff --git a/services/storage-users/pkg/revaconfig/config.go b/services/storage-users/pkg/revaconfig/config.go index f8ecffd9b7..aaa31f59e9 100644 --- a/services/storage-users/pkg/revaconfig/config.go +++ b/services/storage-users/pkg/revaconfig/config.go @@ -2,6 +2,9 @@ package revaconfig import ( + "strconv" + "strings" + "github.com/owncloud/ocis/v2/services/storage-users/pkg/config" ) @@ -74,6 +77,31 @@ func StorageUsersConfigFromStruct(cfg *config.Config) map[string]interface{} { "nats_enable_tls": cfg.Events.EnableTLS, "nats_username": cfg.Events.AuthUsername, "nats_password": cfg.Events.AuthPassword, + "data_txs": map[string]interface{}{ + "simple": map[string]interface{}{ + "cache_store": "noop", + "cache_database": "system", + "cache_table": "stat", + }, + "spaces": map[string]interface{}{ + "cache_store": "noop", + "cache_database": "system", + "cache_table": "stat", + }, + "tus": map[string]interface{}{ + "cache_store": "noop", + "cache_database": "system", + "cache_table": "stat", + "cors_enabled": true, + // allow_origin is configured as a regex in tusd, so we concatenate the configured values into a regex + "cors_allow_origin": "(" + strings.ReplaceAll(strings.Join(cfg.HTTP.CORS.AllowedOrigins, "|"), "*", ".*") + ")", + "cors_allow_credentials": cfg.HTTP.CORS.AllowCredentials, + "cors_allow_methods": strings.Join(cfg.HTTP.CORS.AllowedMethods, ","), + "cors_allow_headers": strings.Join(cfg.HTTP.CORS.AllowedHeaders, ","), + "cors_max_age": strconv.FormatUint(uint64(cfg.HTTP.CORS.MaxAge), 10), + "cors_expose_headers": strings.Join(cfg.HTTP.CORS.ExposedHeaders, ","), + }, + }, }, }, }, diff --git a/services/storage-users/pkg/revaconfig/drivers.go b/services/storage-users/pkg/revaconfig/drivers.go index 0a44caf74c..841a319099 100644 --- a/services/storage-users/pkg/revaconfig/drivers.go +++ b/services/storage-users/pkg/revaconfig/drivers.go @@ -243,6 +243,12 @@ func S3NG(cfg *config.Config) map[string]interface{} { "s3.secret_key": cfg.Drivers.S3NG.SecretKey, "s3.endpoint": cfg.Drivers.S3NG.Endpoint, "s3.bucket": cfg.Drivers.S3NG.Bucket, + "s3.disable_content_sha254": cfg.Drivers.S3NG.DisableContentSha256, + "s3.disable_multipart": cfg.Drivers.S3NG.DisableMultipart, + "s3.send_content_md5": cfg.Drivers.S3NG.SendContentMd5, + "s3.concurrent_stream_parts": cfg.Drivers.S3NG.ConcurrentStreamParts, + "s3.num_threads": cfg.Drivers.S3NG.NumThreads, + "s3.part_size": cfg.Drivers.S3NG.PartSize, "max_acquire_lock_cycles": cfg.Drivers.S3NG.MaxAcquireLockCycles, "lock_cycle_duration_factor": cfg.Drivers.S3NG.LockCycleDurationFactor, "max_concurrency": cfg.Drivers.S3NG.MaxConcurrency, diff --git a/services/userlog/pkg/service/l10n/locale/bg_BG/LC_MESSAGES/userlog.po b/services/userlog/pkg/service/l10n/locale/bg_BG/LC_MESSAGES/userlog.po index 452d8bfa13..e04cf519fa 100644 --- a/services/userlog/pkg/service/l10n/locale/bg_BG/LC_MESSAGES/userlog.po +++ b/services/userlog/pkg/service/l10n/locale/bg_BG/LC_MESSAGES/userlog.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" -"POT-Creation-Date: 2024-02-03 00:35+0000\n" +"POT-Creation-Date: 2024-02-23 00:46+0000\n" "PO-Revision-Date: 2023-03-15 08:28+0000\n" "Last-Translator: Martin Zhekov , 2023\n" "Language-Team: Bulgarian (Bulgaria) (https://app.transifex.com/owncloud-org/teams/6149/bg_BG/)\n" diff --git a/services/userlog/pkg/service/l10n/locale/de/LC_MESSAGES/userlog.po b/services/userlog/pkg/service/l10n/locale/de/LC_MESSAGES/userlog.po index 6f3c5c421b..8706088ba3 100644 --- a/services/userlog/pkg/service/l10n/locale/de/LC_MESSAGES/userlog.po +++ b/services/userlog/pkg/service/l10n/locale/de/LC_MESSAGES/userlog.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" -"POT-Creation-Date: 2024-01-28 00:35+0000\n" +"POT-Creation-Date: 2024-02-17 00:46+0000\n" "PO-Revision-Date: 2023-03-15 08:28+0000\n" "Last-Translator: Michael Barz , 2023\n" "Language-Team: German (https://app.transifex.com/owncloud-org/teams/6149/de/)\n" diff --git a/services/userlog/pkg/service/l10n/locale/ko/LC_MESSAGES/userlog.po b/services/userlog/pkg/service/l10n/locale/ko/LC_MESSAGES/userlog.po index 8402e00774..bcf203536a 100644 --- a/services/userlog/pkg/service/l10n/locale/ko/LC_MESSAGES/userlog.po +++ b/services/userlog/pkg/service/l10n/locale/ko/LC_MESSAGES/userlog.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" -"POT-Creation-Date: 2024-02-03 00:35+0000\n" +"POT-Creation-Date: 2024-02-23 00:46+0000\n" "PO-Revision-Date: 2023-03-15 08:28+0000\n" "Last-Translator: Hugo Blackwood, 2023\n" "Language-Team: Korean (https://app.transifex.com/owncloud-org/teams/6149/ko/)\n" diff --git a/services/userlog/pkg/service/l10n/locale/pt_BR/LC_MESSAGES/userlog.po b/services/userlog/pkg/service/l10n/locale/pt_BR/LC_MESSAGES/userlog.po index f5a140dd40..4599a044f3 100644 --- a/services/userlog/pkg/service/l10n/locale/pt_BR/LC_MESSAGES/userlog.po +++ b/services/userlog/pkg/service/l10n/locale/pt_BR/LC_MESSAGES/userlog.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" -"POT-Creation-Date: 2024-02-03 00:35+0000\n" +"POT-Creation-Date: 2024-02-23 00:46+0000\n" "PO-Revision-Date: 2023-03-15 08:28+0000\n" "Last-Translator: Flávio Veras , 2023\n" "Language-Team: Portuguese (Brazil) (https://app.transifex.com/owncloud-org/teams/6149/pt_BR/)\n" diff --git a/services/userlog/pkg/service/l10n/locale/sq/LC_MESSAGES/userlog.po b/services/userlog/pkg/service/l10n/locale/sq/LC_MESSAGES/userlog.po index dc4cbe4b13..11e5586d07 100644 --- a/services/userlog/pkg/service/l10n/locale/sq/LC_MESSAGES/userlog.po +++ b/services/userlog/pkg/service/l10n/locale/sq/LC_MESSAGES/userlog.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" -"POT-Creation-Date: 2024-02-03 00:35+0000\n" +"POT-Creation-Date: 2024-02-23 00:46+0000\n" "PO-Revision-Date: 2023-03-15 08:28+0000\n" "Last-Translator: Besnik Bleta , 2023\n" "Language-Team: Albanian (https://app.transifex.com/owncloud-org/teams/6149/sq/)\n" diff --git a/services/userlog/pkg/service/l10n/locale/zh_CN/LC_MESSAGES/userlog.po b/services/userlog/pkg/service/l10n/locale/zh_CN/LC_MESSAGES/userlog.po index fc79791ed1..9d0606e84f 100644 --- a/services/userlog/pkg/service/l10n/locale/zh_CN/LC_MESSAGES/userlog.po +++ b/services/userlog/pkg/service/l10n/locale/zh_CN/LC_MESSAGES/userlog.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" -"POT-Creation-Date: 2024-02-03 00:35+0000\n" +"POT-Creation-Date: 2024-02-23 00:46+0000\n" "PO-Revision-Date: 2023-03-15 08:28+0000\n" "Last-Translator: Shouyuan, 2023\n" "Language-Team: Chinese (China) (https://app.transifex.com/owncloud-org/teams/6149/zh_CN/)\n" diff --git a/tests/TestHelpers/WebDavHelper.php b/tests/TestHelpers/WebDavHelper.php index 728416f893..b7bf86af2f 100644 --- a/tests/TestHelpers/WebDavHelper.php +++ b/tests/TestHelpers/WebDavHelper.php @@ -661,7 +661,7 @@ class WebDavHelper { $urlParameter = \http_build_query($urlParameter, '', '&'); $path .= '?' . $urlParameter; } - $fullUrl = self::sanitizeUrl($baseUrl . $davPath . $path); + $fullUrl = self::sanitizeUrl($baseUrl . "/$davPath" . $path); if ($authType === 'bearer') { $headers['Authorization'] = 'Bearer ' . $password; @@ -750,12 +750,12 @@ class WebDavHelper { // return spaces root path if spaceid is null // REPORT request uses spaces root path if ($spaceId === null) { - return "/remote.php/dav/spaces/"; + return "remote.php/dav/spaces/"; } if ($type === "trash-bin") { - return "/remote.php/dav/spaces/trash-bin/" . $spaceId . '/'; + return "remote.php/dav/spaces/trash-bin/" . $spaceId . '/'; } - return "/remote.php/dav/spaces/" . $spaceId . '/'; + return "remote.php/dav/spaces/" . $spaceId . '/'; } else { if ($davPathVersionToUse === self::DAV_VERSION_OLD) { if ($type === "trash-bin") { diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index b1a025e3cb..aa7a496ebc 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -150,6 +150,8 @@ default: - GraphContext: - OcisConfigContext: - SettingsContext: + - TUSContext: + - SpacesTUSContext: apiDepthInfinity: paths: diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md index 9f10eec887..6aa3842d42 100644 --- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md @@ -97,11 +97,6 @@ cannot share a folder with create permission - [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:118](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L118) - [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:130](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L130) -#### [OCS error message for attempting to access share via share id as an unauthorized user is not informative](https://github.com/owncloud/ocis/issues/1233) - -- [coreApiShareOperationsToShares1/gettingShares.feature:144](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares1/gettingShares.feature#L144) -- [coreApiShareOperationsToShares1/gettingShares.feature:145](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares1/gettingShares.feature#L145) - #### [Public link enforce permissions](https://github.com/owncloud/ocis/issues/1269) - [coreApiSharePublicLink1/createPublicLinkShare.feature:288](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink1/createPublicLinkShare.feature#L288) @@ -182,23 +177,6 @@ cannot share a folder with create permission - [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:207](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L207) - [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:208](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L208) -### User Management - -User and group management features - -#### [incorrect ocs(v2) status value when getting info of share that does not exist should be 404, gives 998](https://github.com/owncloud/product/issues/250) - -_ocs: api compatibility, return correct status code_ - -- [coreApiShareOperationsToShares2/shareAccessByID.feature:48](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L48) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:49](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L49) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:50](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L50) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:51](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L51) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:52](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L52) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:53](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L53) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:54](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L54) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:55](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L55) - ### Other API, search, favorites, config, capabilities, not existing endpoints, CORS and others @@ -227,15 +205,6 @@ _ocdav: api compatibility, return correct status code_ - [coreApiAuth/webDavLOCKAuth.feature:46](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavLOCKAuth.feature#L46) - [coreApiAuth/webDavLOCKAuth.feature:58](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavLOCKAuth.feature#L58) -#### [send (MOVE,COPY) requests to another user's webDav endpoints as normal user gives 400 instead of 403](https://github.com/owncloud/ocis/issues/3882) - -_ocdav: api compatibility, return correct status code_ - -- [coreApiAuth/webDavMOVEAuth.feature:45](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavMOVEAuth.feature#L45) -- [coreApiAuth/webDavMOVEAuth.feature:54](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavMOVEAuth.feature#L54) -- [coreApiAuth/webDavCOPYAuth.feature:45](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavCOPYAuth.feature#L45) -- [coreApiAuth/webDavCOPYAuth.feature:54](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavCOPYAuth.feature#L54) - #### [send POST requests to another user's webDav endpoints as normal user](https://github.com/owncloud/ocis/issues/1287) _ocdav: api compatibility, return correct status code_ diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index b8789d196a..4e5a90f28e 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -59,24 +59,24 @@ The expected failures in this file are from features in the owncloud/ocis repo. - [apiGraphUserGroup/getUser.feature:98](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L98) - [apiGraphUserGroup/getUser.feature:99](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L99) - [apiGraphUserGroup/getUser.feature:100](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L100) -- [apiGraphUserGroup/getUser.feature:650](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L650) -- [apiGraphUserGroup/getUser.feature:651](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L651) -- [apiGraphUserGroup/getUser.feature:652](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L652) -- [apiGraphUserGroup/getUser.feature:653](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L653) -- [apiGraphUserGroup/getUser.feature:654](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L654) -- [apiGraphUserGroup/getUser.feature:655](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L655) -- [apiGraphUserGroup/getUser.feature:656](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L656) - [apiGraphUserGroup/getUser.feature:657](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L657) - [apiGraphUserGroup/getUser.feature:658](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L658) - [apiGraphUserGroup/getUser.feature:659](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L659) - [apiGraphUserGroup/getUser.feature:660](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L660) - [apiGraphUserGroup/getUser.feature:661](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L661) +- [apiGraphUserGroup/getUser.feature:662](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L662) +- [apiGraphUserGroup/getUser.feature:663](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L663) +- [apiGraphUserGroup/getUser.feature:664](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L664) +- [apiGraphUserGroup/getUser.feature:665](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L665) +- [apiGraphUserGroup/getUser.feature:666](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L666) +- [apiGraphUserGroup/getUser.feature:667](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L667) +- [apiGraphUserGroup/getUser.feature:668](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L668) #### [Normal user can get expanded members information of a group](https://github.com/owncloud/ocis/issues/5604) -- [apiGraphUserGroup/getGroup.feature:389](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getGroup.feature#L389) -- [apiGraphUserGroup/getGroup.feature:390](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getGroup.feature#L390) -- [apiGraphUserGroup/getGroup.feature:391](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getGroup.feature#L391) +- [apiGraphUserGroup/getGroup.feature:399](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getGroup.feature#L399) +- [apiGraphUserGroup/getGroup.feature:400](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getGroup.feature#L400) +- [apiGraphUserGroup/getGroup.feature:401](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getGroup.feature#L401) #### [Same users can be added in a group multiple time](https://github.com/owncloud/ocis/issues/5702) diff --git a/tests/acceptance/features/apiCors/cors.feature b/tests/acceptance/features/apiCors/cors.feature index 777aa99190..607bd21234 100644 --- a/tests/acceptance/features/apiCors/cors.feature +++ b/tests/acceptance/features/apiCors/cors.feature @@ -100,3 +100,37 @@ Feature: CORS headers And the following headers should be set | header | value | | Access-Control-Allow-Origin | https://aphno.badal | + + + @issue-8380 + Scenario: CORS headers should be returned when uploading file using Tus and when CORS domain sending origin header in the Webdav api + Given user "Alice" has created a new TUS resource for the space "Personal" with content "" using the WebDAV API with these headers: + | Upload-Length | 5 | + # dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt + | Upload-Metadata | filename dGV4dEZpbGUudHh0 | + | Tus-Resumable | 1.0.0 | + | Origin | https://aphno.badal | + When user "Alice" sends a chunk to the last created TUS Location with data "01234" inside of the space "Personal" with headers: + | Origin | https://aphno.badal | + | Upload-Checksum | MD5 4100c4d44da9177247e44a5fc1546778 | + | Upload-Offset | 0 | + Then the HTTP status code should be "204" + And the following headers should be set + | header | value | + | Access-Control-Allow-Origin | https://aphno.badal | + And for user "Alice" the content of the file "/textFile.txt" of the space "Personal" should be "01234" + + + @issue-8380 + Scenario: uploading file using Tus using different CORS headers + Given user "Alice" has created a new TUS resource for the space "Personal" with content "" using the WebDAV API with these headers: + | Upload-Length | 5 | + # dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt + | Upload-Metadata | filename dGV4dEZpbGUudHh0 | + | Tus-Resumable | 1.0.0 | + | Origin | https://something.else | + When user "Alice" sends a chunk to the last created TUS Location with data "01234" inside of the space "Personal" with headers: + | Origin | https://something.else | + | Upload-Checksum | MD5 4100c4d44da9177247e44a5fc1546778 | + | Upload-Offset | 0 | + Then the HTTP status code should be "403" diff --git a/tests/acceptance/features/apiGraph/userGDPRExport.feature b/tests/acceptance/features/apiGraph/userGDPRExport.feature index a2a09040cf..0be645741c 100644 --- a/tests/acceptance/features/apiGraph/userGDPRExport.feature +++ b/tests/acceptance/features/apiGraph/userGDPRExport.feature @@ -389,12 +389,12 @@ Feature: user GDPR (General Data Protection Regulation) report }, "groups": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%group_id_pattern%$" - } - ] + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%group_id_pattern%$" + } }, "uid_number": { "type": "number", @@ -672,8 +672,10 @@ Feature: user GDPR (General Data Protection Regulation) report "opaque_id" ], "properties": { - "type": "object", - "pattern": "^%user_id_pattern%:%user_id_pattern%:%user_id_pattern%$" + "opaque_id": { + "type": "string", + "pattern": "^%user_id_pattern%:%user_id_pattern%:%user_id_pattern%$" + } } }, "Sharee": { diff --git a/tests/acceptance/features/apiGraphUserGroup/editUser.feature b/tests/acceptance/features/apiGraphUserGroup/editUser.feature index 6f1e353202..b3977290eb 100644 --- a/tests/acceptance/features/apiGraphUserGroup/editUser.feature +++ b/tests/acceptance/features/apiGraphUserGroup/editUser.feature @@ -55,7 +55,6 @@ Feature: edit user "onPremisesSamAccountName" ], "properties": { - "type": "string", "onPremisesSamAccountName": { "enum": [""] } diff --git a/tests/acceptance/features/apiGraphUserGroup/getGroup.feature b/tests/acceptance/features/apiGraphUserGroup/getGroup.feature index 5a1ccecf8d..08d6f1e64c 100644 --- a/tests/acceptance/features/apiGraphUserGroup/getGroup.feature +++ b/tests/acceptance/features/apiGraphUserGroup/getGroup.feature @@ -131,35 +131,35 @@ Feature: get groups and their members "properties": { "members": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "onPremisesSamAccountName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["brian@example.org"] - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Brian"] - } + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "onPremisesSamAccountName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["brian@example.org"] + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Brian"] } } - ] + } } } } @@ -174,62 +174,67 @@ Feature: get groups and their members "properties": { "members": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "onPremisesSamAccountName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["alice@example.org"] - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Alice"] + "maxItems": 2, + "minItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "onPremisesSamAccountName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["alice@example.org"] + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Alice"] + } + } + }, + { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "onPremisesSamAccountName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + }, + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["carol@example.org"] + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Carol"] + } } } - }, - { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "onPremisesSamAccountName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Carol King"] - }, - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["carol@example.org"] - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Carol"] - } - } - } - ] + ] + } } } } @@ -291,62 +296,67 @@ Feature: get groups and their members "properties": { "members": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "onPremisesSamAccountName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["alice@example.org"] - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Alice"] + "maxItems": 2, + "minItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "onPremisesSamAccountName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["alice@example.org"] + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Alice"] + } + } + }, + { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "onPremisesSamAccountName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["brian@example.org"] + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Brian"] + } } } - }, - { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "onPremisesSamAccountName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["brian@example.org"] - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Brian"] - } - } - } - ] + ] + } } } } @@ -471,23 +481,27 @@ Feature: get groups and their members "properties": { "value": { "type": "array", - "required": [ - "displayName", - "id", - "groupTypes" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["tea-lover"] - }, - "id": { - "type": "string", - "pattern": "%group_id_pattern%" - }, - "groupTypes": { - "type": "array", - "enum": [] + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "displayName", + "id", + "groupTypes" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["tea-lover"] + }, + "id": { + "type": "string", + "pattern": "%group_id_pattern%" + }, + "groupTypes": { + "const": [] + } } } } diff --git a/tests/acceptance/features/apiGraphUserGroup/getUser.feature b/tests/acceptance/features/apiGraphUserGroup/getUser.feature index 1556cc3893..25cc4e5e3e 100644 --- a/tests/acceptance/features/apiGraphUserGroup/getUser.feature +++ b/tests/acceptance/features/apiGraphUserGroup/getUser.feature @@ -493,14 +493,16 @@ Feature: get users "user" ], "properties": { - "user": "string", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string", - "enum": ["%user_id_pattern%"] + "user": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "%user_id_pattern%" + } } } } @@ -583,32 +585,37 @@ Feature: get users }, "memberOf": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "displayName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["tea-lover"] + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "displayName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["tea-lover"] + } + } + }, + { + "type": "object", + "required": [ + "displayName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["coffee-lover"] + } } } - }, - { - "type": "object", - "required": [ - "displayName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["coffee-lover"] - } - } - } - ] + ] + } } } } @@ -682,72 +689,76 @@ Feature: get users "properties": { "value": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "id", - "mail", - "onPremisesSamAccountName", - "accountEnabled", - "userType" - ], - "properties": { - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["alice@example.org"] - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Alice"] - }, - "accountEnabled": { - "type": "boolean", - "enum": [true] - }, - "userType": { - "type": "string", - "enum": ["Member"] + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "id", + "mail", + "onPremisesSamAccountName", + "accountEnabled", + "userType" + ], + "properties": { + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["alice@example.org"] + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Alice"] + }, + "accountEnabled": { + "type": "boolean", + "enum": [true] + }, + "userType": { + "type": "string", + "enum": ["Member"] + } + } + }, + { + "type": "object", + "required": [ + "id", + "mail", + "onPremisesSamAccountName", + "accountEnabled" + ], + "properties": { + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["brian@example.org"] + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Brian"] + }, + "accountEnabled": { + "type": "boolean", + "enum": [true] + }, + "userType": { + "type": "string", + "enum": ["Member"] + } } } - }, - { - "type": "object", - "required": [ - "id", - "mail", - "onPremisesSamAccountName", - "accountEnabled" - ], - "properties": { - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["brian@example.org"] - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Brian"] - }, - "accountEnabled": { - "type": "boolean", - "enum": [true] - }, - "userType": { - "type": "string", - "enum": ["Member"] - } - } - } - ], - "additionalItems": false + ] + } } } } @@ -765,41 +776,40 @@ Feature: get users "properties": { "value": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "id", - "mail", - "onPremisesSamAccountName", - "accountEnabled", - "userType" - ], - "properties": { - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["brian@example.org"] - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Brian"] - }, - "accountEnabled": { - "type": "boolean", - "enum": [true] - }, - "userType": { - "type": "string", - "enum": ["Member"] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "id", + "mail", + "onPremisesSamAccountName", + "accountEnabled", + "userType" + ], + "properties": { + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["brian@example.org"] + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Brian"] + }, + "accountEnabled": { + "type": "boolean", + "enum": [true] + }, + "userType": { + "type": "string", + "enum": ["Member"] } } - ], - "additionalItems": false + } } } } @@ -1354,28 +1364,33 @@ Feature: get users "properties": { "value": { "type": "array", - "required": [ - "displayName", - "id", - "mail", - "userType" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["alice@example.org"] - }, - "userType": { - "type": "string", - "enum": ["Member"] + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "userType" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["alice@example.org"] + }, + "userType": { + "type": "string", + "enum": ["Member"] + } } } } @@ -1458,28 +1473,33 @@ Feature: get users "properties": { "value": { "type": "array", - "required": [ - "displayName", - "id", - "mail", - "userType" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["alice@example.org"] - }, - "userType": { - "type": "string", - "enum": ["Member"] + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "userType" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["alice@example.org"] + }, + "userType": { + "type": "string", + "enum": ["Member"] + } } } } @@ -1502,28 +1522,33 @@ Feature: get users "properties": { "value": { "type": "array", - "required": [ - "displayName", - "id", - "mail", - "userType" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["alice@example.org"] - }, - "userType": { - "type": "string", - "enum": ["Member"] + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "userType" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["alice@example.org"] + }, + "userType": { + "type": "string", + "enum": ["Member"] + } } } } @@ -1550,63 +1575,68 @@ Feature: get users ], "properties": { "value": { - "type": "array", - "items": [ - { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "userType" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["alice@example.org"] - }, - "userType": { - "type": "string", - "enum": ["Member"] + "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "userType" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["alice@example.org"] + }, + "userType": { + "type": "string", + "enum": ["Member"] + } + } + }, + { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "userType" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["another-alice@example.org"] + }, + "userType": { + "type": "string", + "enum": ["Member"] + } } } - }, - { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "userType" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["another-alice@example.org"] - }, - "userType": { - "type": "string", - "enum": ["Member"] - } - } - } - ] + ] + } } } } diff --git a/tests/acceptance/features/apiGraphUserGroup/getUserOwnInformation.feature b/tests/acceptance/features/apiGraphUserGroup/getUserOwnInformation.feature index 373eb7a9c7..53a52a32e8 100644 --- a/tests/acceptance/features/apiGraphUserGroup/getUserOwnInformation.feature +++ b/tests/acceptance/features/apiGraphUserGroup/getUserOwnInformation.feature @@ -68,32 +68,37 @@ Feature: get user's own information }, "memberOf": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "displayName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["tea-lover"] + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "displayName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["tea-lover"] + } + } + }, + { + "type": "object", + "required": [ + "displayName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["coffee-lover"] + } } } - }, - { - "type": "object", - "required": [ - "displayName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["coffee-lover"] - } - } - } - ] + ] + } } } } diff --git a/tests/acceptance/features/apiSharingNg/linkShare.feature b/tests/acceptance/features/apiSharingNg/linkShare.feature index 23a419d97d..252b0a9b8d 100644 --- a/tests/acceptance/features/apiSharingNg/linkShare.feature +++ b/tests/acceptance/features/apiSharingNg/linkShare.feature @@ -518,6 +518,77 @@ Feature: Create a share link for a resource } """ + @issues-8405 + Scenario Outline: remove expiration date of a resource link share + Given user "Alice" has uploaded file with content "other data" to "textfile1.txt" + And user "Alice" has created folder "folder" + And user "Alice" has created the following link share: + | resource | | + | space | Personal | + | permissionsRole | view | + | password | %public% | + | expirationDateTime | 2200-07-15T14:00:00.000Z | + When user "Alice" updates the last public link share using the Graph API with + | resource | | + | space | Personal | + | expirationDateTime | | + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "hasPassword", + "id", + "link" + ], + "properties": { + "hasPassword": { + "type": "boolean", + "enum": [true] + }, + "id": { + "type": "string", + "pattern": "^[a-zA-Z]{15}$" + }, + "link": { + "type": "object", + "minItems": 5, + "maxItems": 5, + "required": [ + "@libre.graph.displayName", + "@libre.graph.quickLink", + "preventsDownload", + "type", + "webUrl" + ], + "properties": { + "@libre.graph.quickLink": { + "type": "boolean", + "enum": [false] + }, + "preventsDownload": { + "type": "boolean", + "enum": [false] + }, + "type": { + "type": "string", + "enum": ["view"] + }, + "webUrl": { + "type": "string", + "pattern": "^%base_url%\/s\/[a-zA-Z]{15}$" + } + } + } + } + } + """ + Examples: + | path | + | textfile1.txt | + | folder | + @env-config Scenario: set password on a file's link share Given the following configs have been set: diff --git a/tests/acceptance/features/apiSharingNg/listPermissions.feature b/tests/acceptance/features/apiSharingNg/listPermissions.feature index e2ee6aa775..65ecfee70a 100644 --- a/tests/acceptance/features/apiSharingNg/listPermissions.feature +++ b/tests/acceptance/features/apiSharingNg/listPermissions.feature @@ -50,148 +50,151 @@ Feature: List a sharing permissions "type": "array", "minItems": 4, "maxItems": 4, - "items": [ - { - "type": "object", - "required": [ - "@libre.graph.weight", - "description", - "displayName", - "id" - ], - "properties": { - "@libre.graph.weight": { - "type": "integer", - "enum": [ - 1 - ] - }, - "description": { - "type": "string", - "enum": [ - "Allows upload file or folder" - ] - }, - "displayName": { - "type": "string", - "enum": [ - "Uploader" - ] - }, - "id": { - "type": "string", - "enum": [ - "1c996275-f1c9-4e71-abdf-a42f6495e960" - ] + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "@libre.graph.weight", + "description", + "displayName", + "id" + ], + "properties": { + "@libre.graph.weight": { + "type": "integer", + "enum": [ + 1 + ] + }, + "description": { + "type": "string", + "enum": [ + "Allows upload file or folder" + ] + }, + "displayName": { + "type": "string", + "enum": [ + "Uploader" + ] + }, + "id": { + "type": "string", + "enum": [ + "1c996275-f1c9-4e71-abdf-a42f6495e960" + ] + } + } + }, + { + "type": "object", + "required": [ + "@libre.graph.weight", + "description", + "displayName", + "id" + ], + "properties": { + "@libre.graph.weight": { + "type": "integer", + "enum": [ + 2 + ] + }, + "description": { + "type": "string", + "enum": [ + "Allows reading the shared file or folder" + ] + }, + "displayName": { + "type": "string", + "enum": [ + "Viewer" + ] + }, + "id": { + "type": "string", + "enum": [ + "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5" + ] + } + } + }, + { + "type": "object", + "required": [ + "@libre.graph.weight", + "description", + "displayName", + "id" + ], + "properties": { + "@libre.graph.weight": { + "type": "integer", + "enum": [ + 3 + ] + }, + "description": { + "type": "string", + "enum": [ + "Allows reading and updating file" + ] + }, + "displayName": { + "type": "string", + "enum": [ + "Editor" + ] + }, + "id": { + "type": "string", + "enum": [ + "2d00ce52-1fc2-4dbc-8b95-a73b73395f5a" + ] + } + } + }, + { + "type": "object", + "required": [ + "@libre.graph.weight", + "description", + "displayName", + "id" + ], + "properties": { + "@libre.graph.weight": { + "type": "integer", + "enum": [ + 4 + ] + }, + "description": { + "type": "string", + "enum": [ + "Allows creating, reading, updating and deleting the shared file or folder" + ] + }, + "displayName": { + "type": "string", + "enum": [ + "Editor" + ] + }, + "id": { + "type": "string", + "enum": [ + "fb6c3e19-e378-47e5-b277-9732f9de6e21" + ] + } } } - }, - { - "type": "object", - "required": [ - "@libre.graph.weight", - "description", - "displayName", - "id" - ], - "properties": { - "@libre.graph.weight": { - "type": "integer", - "enum": [ - 2 - ] - }, - "description": { - "type": "string", - "enum": [ - "Allows reading the shared file or folder" - ] - }, - "displayName": { - "type": "string", - "enum": [ - "Viewer" - ] - }, - "id": { - "type": "string", - "enum": [ - "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5" - ] - } - } - }, - { - "type": "object", - "required": [ - "@libre.graph.weight", - "description", - "displayName", - "id" - ], - "properties": { - "@libre.graph.weight": { - "type": "integer", - "enum": [ - 3 - ] - }, - "description": { - "type": "string", - "enum": [ - "Allows reading and updating file" - ] - }, - "displayName": { - "type": "string", - "enum": [ - "Editor" - ] - }, - "id": { - "type": "string", - "enum": [ - "2d00ce52-1fc2-4dbc-8b95-a73b73395f5a" - ] - } - } - }, - { - "type": "object", - "required": [ - "@libre.graph.weight", - "description", - "displayName", - "id" - ], - "properties": { - "@libre.graph.weight": { - "type": "integer", - "enum": [ - 4 - ] - }, - "description": { - "type": "string", - "enum": [ - "Allows creating, reading, updating and deleting the shared file or folder" - ] - }, - "displayName": { - "type": "string", - "enum": [ - "Editor" - ] - }, - "id": { - "type": "string", - "enum": [ - "fb6c3e19-e378-47e5-b277-9732f9de6e21" - ] - } - } - } - ] + ] + } } } } diff --git a/tests/acceptance/features/apiSharingNg/shareInvitations.feature b/tests/acceptance/features/apiSharingNg/shareInvitations.feature index aac62a8c60..6787c3b705 100644 --- a/tests/acceptance/features/apiSharingNg/shareInvitations.feature +++ b/tests/acceptance/features/apiSharingNg/shareInvitations.feature @@ -34,6 +34,8 @@ Feature: Send a sharing invitations "properties": { "value": { "type": "array", + "maxItems": 1, + "minItems": 1, "items": { "type": "object", "required": [ @@ -48,6 +50,8 @@ Feature: Send a sharing invitations }, "roles": { "type": "array", + "maxItems": 1, + "minItems": 1, "items": { "type": "string", "pattern": "^%role_id_pattern%$" @@ -125,6 +129,8 @@ Feature: Send a sharing invitations "properties": { "value": { "type": "array", + "maxItems": 1, + "minItems": 1, "items": { "type": "object", "required": [ @@ -139,6 +145,8 @@ Feature: Send a sharing invitations }, "roles": { "type": "array", + "maxItems": 1, + "minItems": 1, "items": { "type": "string", "pattern": "^%role_id_pattern%$" @@ -205,6 +213,8 @@ Feature: Send a sharing invitations "properties": { "value": { "type": "array", + "maxItems": 1, + "minItems": 1, "items": { "type": "object", "required": [ @@ -219,6 +229,8 @@ Feature: Send a sharing invitations }, "@libre.graph.permissions.actions": { "type": "array", + "maxItems": 1, + "minItems": 1, "items": { "type": "string", "pattern": "^libre\\.graph\\/driveItem\\/$" @@ -296,6 +308,8 @@ Feature: Send a sharing invitations "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -310,6 +324,8 @@ Feature: Send a sharing invitations }, "@libre.graph.permissions.actions": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "string", "pattern": "^libre\\.graph\\/driveItem\\/$" @@ -396,6 +412,8 @@ Feature: Send a sharing invitations "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -410,6 +428,8 @@ Feature: Send a sharing invitations }, "@libre.graph.permissions.actions": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "string", "pattern": "^libre\\.graph\\/driveItem\\/$" @@ -493,6 +513,8 @@ Feature: Send a sharing invitations "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -507,6 +529,8 @@ Feature: Send a sharing invitations }, "@libre.graph.permissions.actions": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "string", "pattern": "^libre\\.graph\\/driveItem\\/$" @@ -589,6 +613,8 @@ Feature: Send a sharing invitations "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -604,6 +630,8 @@ Feature: Send a sharing invitations }, "roles": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "string", "pattern": "^%role_id_pattern%$" @@ -684,6 +712,8 @@ Feature: Send a sharing invitations "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -699,6 +729,8 @@ Feature: Send a sharing invitations }, "roles": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "string", "pattern": "^%role_id_pattern%$" @@ -773,6 +805,8 @@ Feature: Send a sharing invitations "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -787,6 +821,8 @@ Feature: Send a sharing invitations }, "roles": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "string", "pattern": "^%role_id_pattern%$" @@ -1637,6 +1673,8 @@ Feature: Send a sharing invitations "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -1673,6 +1711,8 @@ Feature: Send a sharing invitations }, "roles": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "string", "pattern": "^%role_id_pattern%$" @@ -1813,6 +1853,8 @@ Feature: Send a sharing invitations "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -1849,6 +1891,8 @@ Feature: Send a sharing invitations }, "roles": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "string", "pattern": "^%role_id_pattern%$" @@ -2092,6 +2136,8 @@ Feature: Send a sharing invitations "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -2128,6 +2174,8 @@ Feature: Send a sharing invitations }, "roles": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "string", "pattern": "^%role_id_pattern%$" @@ -2181,6 +2229,8 @@ Feature: Send a sharing invitations "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -2195,6 +2245,8 @@ Feature: Send a sharing invitations }, "roles": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "string", "pattern": "^%role_id_pattern%$" diff --git a/tests/acceptance/features/apiSharingNg/sharedByMe.feature b/tests/acceptance/features/apiSharingNg/sharedByMe.feature index 1f30c008f6..9676a392bd 100644 --- a/tests/acceptance/features/apiSharingNg/sharedByMe.feature +++ b/tests/acceptance/features/apiSharingNg/sharedByMe.feature @@ -67,58 +67,58 @@ Feature: resources shared by user }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } }, "name": { "type": "string", @@ -191,58 +191,58 @@ Feature: resources shared by user }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } }, "name": { "type": "string", @@ -313,58 +313,58 @@ Feature: resources shared by user }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } }, "name": { "type": "string", @@ -437,58 +437,58 @@ Feature: resources shared by user }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } }, "name": { "type": "string", @@ -547,58 +547,58 @@ Feature: resources shared by user }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } }, "name": { "type": "string", @@ -667,58 +667,58 @@ Feature: resources shared by user }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } }, "name": { "type": "string", @@ -794,58 +794,58 @@ Feature: resources shared by user }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } }, "name": { "type": "string", @@ -919,58 +919,58 @@ Feature: resources shared by user }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } }, "name": { "type": "string", @@ -1046,58 +1046,58 @@ Feature: resources shared by user }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } }, "name": { "type": "string", @@ -1156,58 +1156,58 @@ Feature: resources shared by user }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } }, "name": { "type": "string", @@ -1281,58 +1281,58 @@ Feature: resources shared by user }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "group" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%group_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "grp1" - ] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "group" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%group_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "grp1" + ] } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } }, "name": { "type": "string", @@ -1391,58 +1391,58 @@ Feature: resources shared by user }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "group" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "grp1" - ] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "group" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "grp1" + ] } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } }, "name": { "type": "string", @@ -1451,3 +1451,66 @@ Feature: resources shared by user } } """ + + @env-config + Scenario: user lists shared resources for deleted sharee + Given the config "GRAPH_SPACES_USERS_CACHE_TTL" has been set to "1" + And the administrator has assigned the role "Admin" to user "Alice" using the Graph API + And user "Alice" has uploaded file with content "hello world" to "textfile.txt" + And user "Alice" has sent the following share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And the administrator has deleted user "Brian" using the provisioning API + When user "Alice" lists the shares shared by her after clearing user cache using the Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "minItems":0, + "maxItems":0 + } + } + } + """ + + @env-config + Scenario: user lists shared resources for deleted group + Given the config "GRAPH_SPACES_GROUPS_CACHE_TTL" has been set to "1" + And group "grp1" has been created + And the administrator has assigned the role "Admin" to user "Alice" using the Graph API + And user "Alice" has uploaded file with content "hello world" to "textfile.txt" + And user "Alice" has sent the following share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | + And group "grp1" has been deleted + When user "Alice" lists the shares shared by her after clearing group cache using the Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "minItems":0, + "maxItems":0 + } + } + } + """ diff --git a/tests/acceptance/features/apiSharingNg/sharedWithMe.feature b/tests/acceptance/features/apiSharingNg/sharedWithMe.feature index b0bee3d760..317fd9509c 100755 --- a/tests/acceptance/features/apiSharingNg/sharedWithMe.feature +++ b/tests/acceptance/features/apiSharingNg/sharedWithMe.feature @@ -32,6 +32,8 @@ Feature: an user gets the resources shared to them "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -210,90 +212,90 @@ Feature: an user gets the resources shared to them }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" } } } - }, - "invitation": { - "type": "object", - "properties": { - "invitedBy": { - "type": "object", - "properties": { - "user": { - "type": "object", - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } + } + }, + "invitation": { + "type": "object", + "properties": { + "invitedBy": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] }, - "required": [ - "displayName", - "id" - ] - } - }, - "required": [ - "user" - ] - } - }, - "required": [ - "invitedBy" - ] + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + }, + "required": [ + "displayName", + "id" + ] + } + }, + "required": [ + "user" + ] + } }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "required": [ + "invitedBy" + ] + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" } } } - ] + } } } }, @@ -329,6 +331,8 @@ Feature: an user gets the resources shared to them "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -500,90 +504,90 @@ Feature: an user gets the resources shared to them }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] }, - "required": [ - "displayName", - "id" - ] - } + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + }, + "required": [ + "displayName", + "id" + ] + } + } + }, + "invitation": { + "type": "object", + "properties": { + "invitedBy": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + }, + "required": [ + "displayName", + "id" + ] + } + }, + "required": [ + "user" + ] } }, - "invitation": { - "type": "object", - "properties": { - "invitedBy": { - "type": "object", - "properties": { - "user": { - "type": "object", - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - }, - "required": [ - "displayName", - "id" - ] - } - }, - "required": [ - "user" - ] - } - }, - "required": [ - "invitedBy" - ] - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "required": [ + "invitedBy" + ] + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" } } } - ] + } } } } @@ -624,6 +628,8 @@ Feature: an user gets the resources shared to them "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -800,6 +806,9 @@ Feature: an user gets the resources shared to them }, "permissions": { "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, "items": { "oneOf": [ { @@ -867,12 +876,12 @@ Feature: an user gets the resources shared to them }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } }, @@ -941,12 +950,12 @@ Feature: an user gets the resources shared to them }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } @@ -1006,6 +1015,8 @@ Feature: an user gets the resources shared to them "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -1131,6 +1142,9 @@ Feature: an user gets the resources shared to them }, "permissions": { "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, "items": { "oneOf": [ { @@ -1198,12 +1212,12 @@ Feature: an user gets the resources shared to them }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } }, @@ -1272,12 +1286,12 @@ Feature: an user gets the resources shared to them }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } @@ -1335,6 +1349,8 @@ Feature: an user gets the resources shared to them "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -1491,6 +1507,9 @@ Feature: an user gets the resources shared to them }, "permissions": { "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, "items": { "oneOf": [ { @@ -1558,12 +1577,12 @@ Feature: an user gets the resources shared to them }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } }, @@ -1632,12 +1651,12 @@ Feature: an user gets the resources shared to them }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } @@ -1685,6 +1704,8 @@ Feature: an user gets the resources shared to them "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -1790,6 +1811,9 @@ Feature: an user gets the resources shared to them }, "permissions": { "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, "items": { "oneOf": [ { @@ -1857,12 +1881,12 @@ Feature: an user gets the resources shared to them }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } }, @@ -1931,12 +1955,12 @@ Feature: an user gets the resources shared to them }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } @@ -1974,6 +1998,8 @@ Feature: an user gets the resources shared to them "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -2144,78 +2170,76 @@ Feature: an user gets the resources shared to them "type": "array", "maxItems": 1, "minItems": 1, - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": ["group"], - "properties":{ - "group": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["grp1"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties":{ + "group": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["grp1"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "user":{ + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "user":{ - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } }, "size": { "type": "number", @@ -2258,6 +2282,8 @@ Feature: an user gets the resources shared to them "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -2380,78 +2406,76 @@ Feature: an user gets the resources shared to them "type": "array", "maxItems": 1, "minItems": 1, - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": ["group"], - "properties":{ - "group": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["grp1"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties":{ + "group": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["grp1"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "user":{ + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "user":{ - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } }, "size": { "type": "number", @@ -2493,6 +2517,8 @@ Feature: an user gets the resources shared to them "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -2633,78 +2659,76 @@ Feature: an user gets the resources shared to them "type": "array", "maxItems": 1, "minItems": 1, - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": ["group"], - "properties":{ - "group": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["grp1"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties":{ + "group": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["grp1"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "user":{ + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "user":{ - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } } } } @@ -2739,6 +2763,8 @@ Feature: an user gets the resources shared to them "properties": { "value": { "type": "array", + "minItems": 1, + "maxItems": 1, "items": { "type": "object", "required": [ @@ -2840,78 +2866,76 @@ Feature: an user gets the resources shared to them "type": "array", "maxItems": 1, "minItems": 1, - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": ["group"], - "properties":{ - "group": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["grp1"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties":{ + "group": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["grp1"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" } } } - }, - "id": { + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "user":{ + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "user":{ - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "pattern": "^%role_id_pattern%$" } } } - ] + } } } } @@ -2921,3 +2945,597 @@ Feature: an user gets the resources shared to them } } """ + + + Scenario: user lists the file with same name shared by two users with him/her + Given user "Carol" has been created with default attributes and without skeleton files + And user "Alice" has uploaded file with content "to share" to "textfile.txt" + And user "Carol" has uploaded file with content "to share" to "textfile.txt" + And user "Alice" has sent the following share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Carol" has sent the following share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + When user "Brian" lists the shares shared with him using the Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden": { + "type": "boolean", + "enum": [false] + }, + "@client.synchronize": { + "type": "boolean", + "enum": [true] + }, + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["textfile (1).txt"] + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName","id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["textfile.txt"] + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": ["grantedToV2", "id", "invitation", "roles"], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + } + } + } + } + } + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + } + } + } + } + } + } + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden": { + "type": "boolean", + "enum": [false] + }, + "@client.synchronize": { + "type": "boolean", + "enum": [true] + }, + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["textfile.txt"] + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["textfile.txt"] + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": ["grantedToV2", "id", "invitation", "roles"], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + } + } + } + } + } + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + } + } + } + } + } + } + } + } + } + } + } + } + } + ] + } + } + } + } + """ + + + Scenario: user lists the folder with same name shared by two users with him/her + Given user "Carol" has been created with default attributes and without skeleton files + And user "Alice" has created folder "folderToShare" + And user "Carol" has created folder "folderToShare" + And user "Alice" has sent the following share invitation: + | resource | folderToShare | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Carol" has sent the following share invitation: + | resource | folderToShare | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + When user "Brian" lists the shares shared with him using the Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden": { + "type": "boolean", + "enum": [false] + }, + "@client.synchronize": { + "type": "boolean", + "enum": [true] + }, + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["folderToShare (1)"] + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName","id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["folderToShare"] + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": ["grantedToV2", "id", "invitation", "roles"], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + } + } + } + } + } + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + } + } + } + } + } + } + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden": { + "type": "boolean", + "enum": [false] + }, + "@client.synchronize": { + "type": "boolean", + "enum": [true] + }, + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["folderToShare"] + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["folderToShare"] + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": ["grantedToV2", "id", "invitation", "roles"], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + } + } + } + } + } + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + } + } + } + } + } + } + } + } + } + } + } + } + } + ] + } + } + } + } + """ diff --git a/tests/acceptance/features/apiSharingNg/sharedWithMeSyncDisabled.feature b/tests/acceptance/features/apiSharingNg/sharedWithMeSyncDisabled.feature index 2e2a8ad430..4e162a22e5 100644 --- a/tests/acceptance/features/apiSharingNg/sharedWithMeSyncDisabled.feature +++ b/tests/acceptance/features/apiSharingNg/sharedWithMeSyncDisabled.feature @@ -10,11 +10,11 @@ Feature: listing sharedWithMe when auto-sync is disabled | username | | Alice | | Brian | - - - Scenario: user lists the file shared with them when auto-sync is disabled - Given user "Alice" has uploaded file with content "to share" to "textfile.txt" And user "Brian" has disabled the auto-sync share + + + Scenario: user lists the file shared with them + Given user "Alice" has uploaded file with content "to share" to "textfile.txt" And user "Alice" has sent the following share invitation: | resource | textfile.txt | | space | Personal | @@ -33,6 +33,8 @@ Feature: listing sharedWithMe when auto-sync is disabled "properties": { "value": { "type": "array", + "maxItems": 1, + "minItems": 1, "items": { "type": "object", "required": [ @@ -189,32 +191,32 @@ Feature: listing sharedWithMe when auto-sync is disabled }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" } } } @@ -252,15 +254,15 @@ Feature: listing sharedWithMe when auto-sync is disabled }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "maxItems": 1, + "minItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } - ] + } }, "size": { "type": "number", @@ -280,9 +282,8 @@ Feature: listing sharedWithMe when auto-sync is disabled """ - Scenario: user lists the folder shared with them when auto-sync is disabled + Scenario: user lists the folder shared with them Given user "Alice" has created folder "folderToShare" - And user "Brian" has disabled the auto-sync share And user "Alice" has sent the following share invitation: | resource | folderToShare | | space | Personal | @@ -301,6 +302,8 @@ Feature: listing sharedWithMe when auto-sync is disabled "properties": { "value": { "type": "array", + "maxItems": 1, + "minItems": 1, "items": { "type": "object", "required": [ @@ -435,32 +438,32 @@ Feature: listing sharedWithMe when auto-sync is disabled }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" } } } @@ -498,15 +501,15 @@ Feature: listing sharedWithMe when auto-sync is disabled }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "maxItems": 1, + "minItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } - ] + } } } } @@ -518,15 +521,12 @@ Feature: listing sharedWithMe when auto-sync is disabled """ - Scenario: group member lists the file shared with them when auto-sync is disabled - And user "Carol" has been created with default attributes and without skeleton files - And group "grp1" has been created + Scenario: group member lists the file shared with them + Given group "grp1" has been created And the following users have been added to the following groups | username | groupname | | Brian | grp1 | - | Carol | grp1 | - Given user "Alice" has uploaded file with content "to share" to "textfile.txt" - And user "Brian" has disabled the auto-sync share + And user "Alice" has uploaded file with content "to share" to "textfile.txt" And user "Alice" has sent the following share invitation: | resource | textfile.txt | | space | Personal | @@ -545,6 +545,8 @@ Feature: listing sharedWithMe when auto-sync is disabled "properties": { "value": { "type": "array", + "maxItems": 1, + "minItems": 1, "items": { "type": "object", "required": [ @@ -701,32 +703,32 @@ Feature: listing sharedWithMe when auto-sync is disabled }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": ["group"], - "properties": { - "group": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "type": "string", - "enum": ["grp1"] - }, - "id": { - "type": "string", - "pattern": "^%group_id_pattern%$" - } + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties": { + "group": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["grp1"] + }, + "id": { + "type": "string", + "pattern": "^%group_id_pattern%$" } } } @@ -764,15 +766,15 @@ Feature: listing sharedWithMe when auto-sync is disabled }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "maxItems": 1, + "minItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } - ] + } }, "size": { "type": "number", @@ -792,15 +794,12 @@ Feature: listing sharedWithMe when auto-sync is disabled """ - Scenario: group member lists the folder shared with them when auto-sync is disabled - And user "Carol" has been created with default attributes and without skeleton files - And group "grp1" has been created + Scenario: group member lists the folder shared with them + Given group "grp1" has been created And the following users have been added to the following groups | username | groupname | | Brian | grp1 | - | Carol | grp1 | - Given user "Alice" has created folder "folderToShare" - And user "Brian" has disabled the auto-sync share + And user "Alice" has created folder "folderToShare" And user "Alice" has sent the following share invitation: | resource | folderToShare | | space | Personal | @@ -819,6 +818,8 @@ Feature: listing sharedWithMe when auto-sync is disabled "properties": { "value": { "type": "array", + "maxItems": 1, + "minItems": 1, "items": { "type": "object", "required": [ @@ -953,32 +954,32 @@ Feature: listing sharedWithMe when auto-sync is disabled }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": ["group"], - "properties": { - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "type": "string", - "enum": ["grp1"] - }, - "id": { - "type": "string", - "pattern": "^%group_id_pattern%$" - } + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["grp1"] + }, + "id": { + "type": "string", + "pattern": "^%group_id_pattern%$" } } } @@ -1016,15 +1017,15 @@ Feature: listing sharedWithMe when auto-sync is disabled }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "maxItems": 1, + "minItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } - ] + } } } } @@ -1036,12 +1037,11 @@ Feature: listing sharedWithMe when auto-sync is disabled """ - Scenario: user lists file shares shared with them from project-space when auto-sync is disabled + Scenario: user lists file shares shared with them from project-space Given using spaces DAV path And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API And user "Alice" has created a space "projectSpace" with the default quota using the Graph API And user "Alice" has uploaded a file inside space "projectSpace" with content "to share" to "textfile.txt" - And user "Brian" has disabled the auto-sync share And user "Alice" has sent the following share invitation: | resource | textfile.txt | | space | projectSpace | @@ -1060,6 +1060,8 @@ Feature: listing sharedWithMe when auto-sync is disabled "properties": { "value": { "type": "array", + "maxItems": 1, + "minItems": 1, "items": { "type": "object", "required": [ @@ -1181,35 +1183,35 @@ Feature: listing sharedWithMe when auto-sync is disabled }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" } } } @@ -1250,15 +1252,15 @@ Feature: listing sharedWithMe when auto-sync is disabled }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "maxItems": 1, + "minItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } - ] + } }, "size": { "type": "number", @@ -1278,12 +1280,11 @@ Feature: listing sharedWithMe when auto-sync is disabled """ - Scenario: user lists folder shares shared with them from project-space when auto-sync is disabled + Scenario: user lists folder shares shared with them from project-space Given using spaces DAV path And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API And user "Alice" has created a space "projectSpace" with the default quota using the Graph API And user "Alice" has created a folder "folderToShare" in space "projectSpace" - And user "Brian" has disabled the auto-sync share And user "Alice" has sent the following share invitation: | resource | folderToShare | | space | projectSpace | @@ -1300,6 +1301,8 @@ Feature: listing sharedWithMe when auto-sync is disabled "properties": { "value": { "type": "array", + "maxItems": 1, + "minItems": 1, "items": { "type": "object", "required": [ @@ -1402,37 +1405,37 @@ Feature: listing sharedWithMe when auto-sync is disabled }, "permissions": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" } } } @@ -1475,15 +1478,15 @@ Feature: listing sharedWithMe when auto-sync is disabled }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "maxItems": 1, + "minItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } - ] + } } } } @@ -1493,3 +1496,1321 @@ Feature: listing sharedWithMe when auto-sync is disabled } } """ + + + Scenario: group member lists the file shared with them from project-space + Given using spaces DAV path + And group "grp1" has been created + And the following users have been added to the following groups + | username | groupname | + | Brian | grp1 | + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "projectSpace" with the default quota using the Graph API + And user "Alice" has uploaded a file inside space "projectSpace" with content "to share" to "textfile.txt" + And user "Alice" has sent the following share invitation: + | resource | textfile.txt | + | space | projectSpace | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | + When user "Brian" lists the shares shared with him using the Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem", + "size" + ], + "properties": { + "@UI.Hidden": { + "type": "boolean", + "enum": [false] + }, + "@client.synchronize": { + "type": "boolean", + "enum": [false] + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { + "type": "string", + "enum": ["text/plain"] + } + } + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "type": "string", + "enum": ["textfile.txt"] + }, + "parentReference": { + "type": "object", + "required": ["driveId", "driveType", "id"], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["virtual"] + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + } + } + }, + "remoteItem": { + "type": "object", + "required": [ + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions", + "size" + ], + "properties": { + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { + "type": "string", + "enum": ["text/plain"] + } + } + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "type": "string", + "enum": ["textfile.txt"] + }, + "parentReference": { + "type": "object", + "required": ["driveId", "driveType"], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["project"] + } + } + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties": { + "group": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["grp1"] + }, + "id": { + "type": "string", + "pattern": "^%group_id_pattern%$" + } + } + } + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } + } + } + } + }, + "size": { + "type": "number", + "enum": [8] + } + } + }, + "size": { + "type": "number", + "enum": [8] + } + } + } + } + } + } + """ + + + Scenario: group member lists the space folder shared with them from project-space + Given using spaces DAV path + And group "grp1" has been created + And the following users have been added to the following groups + | username | groupname | + | Brian | grp1 | + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "projectSpace" with the default quota using the Graph API + And user "Alice" has created a folder "folderToShare" in space "projectSpace" + And user "Alice" has sent the following share invitation: + | resource | folderToShare | + | space | projectSpace | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | + When user "Brian" lists the shares shared with him using the Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden": { + "type": "boolean", + "enum": [false] + }, + "@client.synchronize": { + "type": "boolean", + "enum": [false] + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "type": "string", + "enum": ["folderToShare"] + }, + "parentReference": { + "type": "object", + "required": ["driveId", "driveType", "id"], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["virtual"] + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + } + } + }, + "remoteItem": { + "type": "object", + "required": [ + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "type": "string", + "enum": ["folderToShare"] + }, + "parentReference": { + "type": "object", + "required": ["driveId", "driveType"], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["project"] + } + } + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } + } + } + } + } + } + } + } + } + } + } + } + """ + + + Scenario: user who is also a member of group lists the file shared with them + Given group "grp1" has been created + And the following users have been added to the following groups + | username | groupname | + | Brian | grp1 | + And user "Alice" has uploaded file with content "to share" to "textfile.txt" + And user "Alice" has sent the following share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Alice" has sent the following share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | + When user "Brian" lists the shares shared with him using the Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem", + "size" + ], + "properties": { + "@UI.Hidden": { + "type": "boolean", + "enum": [false] + }, + "@client.synchronize": { + "type": "boolean", + "enum": [false] + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions", + "size" + ], + "properties": { + "permissions": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "group": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties": { + "group": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["grp1"] + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + """ + + + Scenario: user who is also a member of group lists the folder shared with them + Given group "grp1" has been created + And the following users have been added to the following groups + | username | groupname | + | Brian | grp1 | + And user "Alice" has created folder "folderToShare" + And user "Alice" has sent the following share invitation: + | resource | folderToShare | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Alice" has sent the following share invitation: + | resource | folderToShare | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | + When user "Brian" lists the shares shared with him using the Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden": { + "type": "boolean", + "enum": [false] + }, + "@client.synchronize": { + "type": "boolean", + "enum": [false] + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "permissions": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "group": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties": { + "group": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["grp1"] + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + """ + + + Scenario: user lists the file with same name shared by two users with him/her + Given user "Carol" has been created with default attributes and without skeleton files + And user "Alice" has uploaded file with content "to share" to "textfile.txt" + And user "Carol" has uploaded file with content "to share" to "textfile.txt" + And user "Alice" has sent the following share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Carol" has sent the following share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + When user "Brian" lists the shares shared with him using the Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden": { + "type": "boolean", + "enum": [false] + }, + "@client.synchronize": { + "type": "boolean", + "enum": [false] + }, + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["textfile.txt"] + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName","id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["textfile.txt"] + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": ["grantedToV2", "id", "invitation", "roles"], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + } + } + } + } + } + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + } + } + } + } + } + } + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden": { + "type": "boolean", + "enum": [false] + }, + "@client.synchronize": { + "type": "boolean", + "enum": [false] + }, + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["textfile.txt"] + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["textfile.txt"] + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": ["grantedToV2", "id", "invitation", "roles"], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + } + } + } + } + } + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + } + } + } + } + } + } + } + } + } + } + } + } + } + ] + } + } + } + } + """ + + + Scenario: user lists the folder with same name shared by two users with him/her + Given user "Carol" has been created with default attributes and without skeleton files + And user "Alice" has created folder "folderToShare" + And user "Carol" has created folder "folderToShare" + And user "Alice" has sent the following share invitation: + | resource | folderToShare | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Carol" has sent the following share invitation: + | resource | folderToShare | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + When user "Brian" lists the shares shared with him using the Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden": { + "type": "boolean", + "enum": [false] + }, + "@client.synchronize": { + "type": "boolean", + "enum": [false] + }, + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["folderToShare"] + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName","id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["folderToShare"] + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": ["grantedToV2", "id", "invitation", "roles"], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + } + } + } + } + } + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + } + } + } + } + } + } + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden": { + "type": "boolean", + "enum": [false] + }, + "@client.synchronize": { + "type": "boolean", + "enum": [false] + }, + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["folderToShare"] + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + } + } + } + } + }, + "name": { + "type": "string", + "enum": ["folderToShare"] + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": ["grantedToV2", "id", "invitation", "roles"], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + } + } + } + } + } + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + } + } + } + } + } + } + } + } + } + } + } + } + } + ] + } + } + } + } + """ diff --git a/tests/acceptance/features/apiSharingNg/updateShareInvitations.feature b/tests/acceptance/features/apiSharingNg/updateShareInvitations.feature index 0ba82e457d..22be6872dd 100644 --- a/tests/acceptance/features/apiSharingNg/updateShareInvitations.feature +++ b/tests/acceptance/features/apiSharingNg/updateShareInvitations.feature @@ -71,18 +71,92 @@ Feature: Update permission of a share }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } """ + Scenario Outline: user removes expiration date of a share + Given user "Alice" has uploaded file with content "hello world" to "testfile.txt" + And user "Alice" has created folder "folder" + And user "Alice" has sent the following share invitation: + | resource | | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + | expirationDateTime | 2025-07-15T14:00:00Z | + When user "Alice" updates the last share with the following using the Graph API: + | space | Personal | + | resource | | + | expirationDateTime | | + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "minItems": 3, + "maxItems": 3, + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } + } + } + } + """ + Examples: + | path | + | testfile.txt | + | folder | + + Scenario Outline: user updates role of a share Given user "Alice" has uploaded file with content "to share" to "/textfile1.txt" And user "Alice" has created folder "FolderToShare" @@ -138,12 +212,12 @@ Feature: Update permission of a share }, "roles": { "type": "array", - "items": [ - { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - ] + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } @@ -157,4 +231,4 @@ Feature: Update permission of a share | Editor | FolderToShare | Viewer | | Editor | FolderToShare | Uploader | | Uploader | FolderToShare | Editor | - | Uploader | FolderToShare | Viewer | \ No newline at end of file + | Uploader | FolderToShare | Viewer | diff --git a/tests/acceptance/features/apiSpaces/changeSpaces.feature b/tests/acceptance/features/apiSpaces/changeSpaces.feature index 4c34faceef..f7297e2557 100644 --- a/tests/acceptance/features/apiSpaces/changeSpaces.feature +++ b/tests/acceptance/features/apiSpaces/changeSpaces.feature @@ -167,61 +167,61 @@ Feature: Change data of space }, "special": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "size", - "name", - "specialFolder", - "file", - "id", - "eTag" - ], - "properties": { - "size": { - "type": "number", - "enum": [17] - }, - "name": { - "type": "string", - "enum": ["readme.md"] - }, - "specialFolder": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "enum": ["readme"] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "size", + "name", + "specialFolder", + "file", + "id", + "eTag" + ], + "properties": { + "size": { + "type": "number", + "enum": [17] + }, + "name": { + "type": "string", + "enum": ["readme.md"] + }, + "specialFolder": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "enum": ["readme"] } - }, - "file": { - "type": "object", - "required": [ - "mimeType" - ], - "properties": { - "mimeType": { - "type": "string", - "enum": ["text/markdown"] - } - } - }, - "id": { - "type": "string", - "enum": ["%file_id%"] - }, - "tag": { - "type": "string", - "enum": ["%eTag%"] } + }, + "file": { + "type": "object", + "required": [ + "mimeType" + ], + "properties": { + "mimeType": { + "type": "string", + "enum": ["text/markdown"] + } + } + }, + "id": { + "type": "string", + "enum": ["%file_id%"] + }, + "tag": { + "type": "string", + "enum": ["%eTag%"] } } - ] + } } } } @@ -262,61 +262,61 @@ Feature: Change data of space }, "special": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "size", - "name", - "specialFolder", - "file", - "id", - "eTag" - ], - "properties": { - "size": { - "type": "number", - "enum": [0] - }, - "name": { - "type": "string", - "enum": [""] - }, - "specialFolder": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "enum": ["image"] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "size", + "name", + "specialFolder", + "file", + "id", + "eTag" + ], + "properties": { + "size": { + "type": "number", + "enum": [0] + }, + "name": { + "type": "string", + "enum": [""] + }, + "specialFolder": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "enum": ["image"] } - }, - "file": { - "type": "object", - "required": [ - "mimeType" - ], - "properties": { - "mimeType": { - "type": "string", - "enum": [""] - } - } - }, - "id": { - "type": "string", - "enum": ["%file_id%"] - }, - "tag": { - "type": "string", - "enum": ["%eTag%"] } + }, + "file": { + "type": "object", + "required": [ + "mimeType" + ], + "properties": { + "mimeType": { + "type": "string", + "enum": [""] + } + } + }, + "id": { + "type": "string", + "enum": ["%file_id%"] + }, + "tag": { + "type": "string", + "enum": ["%eTag%"] } } - ] + } } } } @@ -359,61 +359,61 @@ Feature: Change data of space }, "special": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "size", - "name", - "specialFolder", - "file", - "id", - "eTag" - ], - "properties": { - "size": { - "type": "number", - "enum": [] - }, - "name": { - "type": "string", - "enum": ["readme.md"] - }, - "specialFolder": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "enum": ["readme"] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "size", + "name", + "specialFolder", + "file", + "id", + "eTag" + ], + "properties": { + "size": { + "type": "number", + "enum": [] + }, + "name": { + "type": "string", + "enum": ["readme.md"] + }, + "specialFolder": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "enum": ["readme"] } - }, - "file": { - "type": "object", - "required": [ - "mimeType" - ], - "properties": { - "mimeType": { - "type": "string", - "enum": ["text/markdown"] - } - } - }, - "id": { - "type": "string", - "enum": ["%file_id%"] - }, - "tag": { - "type": "string", - "enum": ["%eTag%"] } + }, + "file": { + "type": "object", + "required": [ + "mimeType" + ], + "properties": { + "mimeType": { + "type": "string", + "enum": ["text/markdown"] + } + } + }, + "id": { + "type": "string", + "enum": ["%file_id%"] + }, + "tag": { + "type": "string", + "enum": ["%eTag%"] } } - ] + } } } } @@ -447,61 +447,61 @@ Feature: Change data of space }, "special": { "type": "array", - "items": [ - { - "type": "object", - "required": [ - "size", - "name", - "specialFolder", - "file", - "id", - "eTag" - ], - "properties": { - "size": { - "type": "number", - "enum": [0] - }, - "name": { - "type": "string", - "enum": ["newSpaceImage.png"] - }, - "specialFolder": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "enum": ["image"] - } + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "size", + "name", + "specialFolder", + "file", + "id", + "eTag" + ], + "properties": { + "size": { + "type": "number", + "enum": [0] + }, + "name": { + "type": "string", + "enum": ["newSpaceImage.png"] + }, + "specialFolder": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "enum": ["image"] } - }, - "file": { - "type": "object", - "required": [ - "mimeType" - ], - "properties": { - "mimeType": { - "type": "string", - "enum": ["image/png"] - } - } - }, - "id": { - "type": "string", - "enum": ["%file_id%"] - }, - "tag": { - "type": "string", - "enum": ["%eTag%"] } + }, + "file": { + "type": "object", + "required": [ + "mimeType" + ], + "properties": { + "mimeType": { + "type": "string", + "enum": ["image/png"] + } + } + }, + "id": { + "type": "string", + "enum": ["%file_id%"] + }, + "tag": { + "type": "string", + "enum": ["%eTag%"] } } - ] + } } } } diff --git a/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature b/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature index 5e9ae60860..d3862bd9d5 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature @@ -706,3 +706,71 @@ Feature: moving/renaming file using file id | dav-path | | /remote.php/dav/spaces/<> | | /dav/spaces/<> | + + @issue-6739 + Scenario Outline: try to move personal file to other spaces using its id as the destination + Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "myspace" with the default quota using the Graph API + And user "Alice" has uploaded file with content "some data" to "textfile.txt" + When user "Alice" tries to move file "textfile.txt" of space "Personal" to space "" using its id in destination path "" + Then the HTTP status code should be "" + And for user "Alice" the space "Personal" should contain these entries: + | textfile.txt | + Examples: + | dav-path | space | http-status-code | + | /remote.php/dav/spaces | Personal | 400 | + | /dav/spaces | Personal | 400 | + | /remote.php/dav/spaces | myspace | 400 | + | /dav/spaces | myspace | 400 | + | /remote.php/dav/spaces | Shares | 404 | + | /dav/spaces | Shares | 404 | + + @issue-6739 + Scenario Outline: try to move project file to other spaces using its id as the destination + Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "myspace" with the default quota using the Graph API + And user "Alice" has uploaded a file inside space "myspace" with content "some data" to "textfile.txt" + When user "Alice" tries to move file "textfile.txt" of space "myspace" to space "" using its id in destination path "" + Then the HTTP status code should be "" + And for user "Alice" the space "myspace" should contain these entries: + | textfile.txt | + Examples: + | dav-path | space | http-status-code | + | /remote.php/dav/spaces | Personal | 400 | + | /dav/spaces | Personal | 400 | + | /remote.php/dav/spaces | myspace | 400 | + | /dav/spaces | myspace | 400 | + | /remote.php/dav/spaces | Shares | 404 | + | /dav/spaces | Shares | 404 | + + @issue-6739 + Scenario Outline: move a file to folder using its id as the destination (Personal space) + Given user "Alice" has uploaded file with content "some data" to "textfile.txt" + And user "Alice" has created folder "docs" + When user "Alice" moves file "textfile.txt" of space "Personal" to folder "docs" using its id in destination path "" + Then the HTTP status code should be "204" + And the content of file "docs" for user "Alice" should be "some data" + And as "Alice" file "textfile.txt" should not exist + And as "Alice" folder "docs" should not exist + And as "Alice" folder "docs" should exist in the trashbin of the space "Personal" + Examples: + | dav-path | + | /remote.php/dav/spaces | + | /dav/spaces | + + @issue-6739 + Scenario Outline: move a file to folder using its id as the destination (Project space) + Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "myspace" with the default quota using the Graph API + And user "Alice" has uploaded a file inside space "myspace" with content "some data" to "textfile.txt" + And user "Alice" has created a folder "docs" in space "myspace" + When user "Alice" moves file "textfile.txt" of space "myspace" to folder "docs" using its id in destination path "" + Then the HTTP status code should be "204" + And for user "Alice" the content of the file "docs" of the space "myspace" should be "some data" + And as "Alice" folder "docs" should exist in the trashbin of the space "myspace" + And for user "Alice" folder "/" of the space "myspace" should not contain these files: + | textfile.txt | + Examples: + | dav-path | + | /remote.php/dav/spaces | + | /dav/spaces | diff --git a/tests/acceptance/features/apiSpacesShares/shareSubItemOfSpace.feature b/tests/acceptance/features/apiSpacesShares/shareSubItemOfSpace.feature index dc3094770a..1f6540a3b7 100644 --- a/tests/acceptance/features/apiSpacesShares/shareSubItemOfSpace.feature +++ b/tests/acceptance/features/apiSpacesShares/shareSubItemOfSpace.feature @@ -165,3 +165,50 @@ Feature: Share a file or folder that is inside a space When user "Alice" expires the last share Then the HTTP status code should be "200" And as "Brian" folder "Shares/folder" should not exist + + @issue-enterprise-6423 @env-config + Scenario Outline: user cannot share items in the project space with share permission if resharing is denied + Given the config "OCIS_ENABLE_RESHARING" has been set to "false" + And user "Alice" has shared a space "share sub-item" with settings: + | shareWith | Brian | + | role | viewer | + When user "Alice" creates a share inside of space "share sub-item" with settings: + | path | folder | + | shareWith | Bob | + | role | custom | + | permissions | | + Then the HTTP status code should be "400" + And the OCS status code should be "400" + And the OCS status message should be "resharing not supported" + Examples: + | permissions | description | + | 19 | view + edit | + | 21 | view + create | + | 23 | view + create + edit | + | 25 | view + delete | + | 27 | view + edit + delete | + | 29 | view + create + delete | + | 31 | view + create + edit +delete | + + + @issue-enterprise-6423 @env-config + Scenario Outline: user cannot share items in the personal space with share permission if resharing is denied + Given the config "OCIS_ENABLE_RESHARING" has been set to "false" + And user "Alice" has uploaded file with content "some content" to "/file.txt" + When user "Alice" creates a share inside of space "Alice Hansen" with settings: + | path | file.txt | + | shareWith | Bob | + | role | custom | + | permissions | | + Then the HTTP status code should be "400" + And the OCS status code should be "400" + And the OCS status message should be "resharing not supported" + Examples: + | permissions | description | + | 19 | view + edit | + | 21 | view + create | + | 23 | view + create + edit | + | 25 | view + delete | + | 27 | view + edit + delete | + | 29 | view + create + delete | + | 31 | view + create + edit +delete | diff --git a/tests/acceptance/features/bootstrap/AuthContext.php b/tests/acceptance/features/bootstrap/AuthContext.php index bf414895ea..6a85dbcb00 100644 --- a/tests/acceptance/features/bootstrap/AuthContext.php +++ b/tests/acceptance/features/bootstrap/AuthContext.php @@ -25,6 +25,7 @@ use Behat\Gherkin\Node\TableNode; use Behat\Behat\Context\Context; use TestHelpers\SetupHelper; use \Psr\Http\Message\ResponseInterface; +use TestHelpers\WebDavHelper; /** * Authentication functions @@ -592,7 +593,13 @@ class AuthContext implements Context { public function userRequestsTheseEndpointsAboutUser(string $user, string $method, string $ofUser, TableNode $table):void { $headers = []; if ($method === 'MOVE' || $method === 'COPY') { - $headers['Destination'] = '/path/to/destination'; + $baseUrl = $this->featureContext->getBaseUrl(); + $suffix = ""; + if ($this->featureContext->getDavPathVersion() === WebDavHelper::DAV_VERSION_SPACES) { + $suffix = $this->featureContext->spacesContext->getSpaceIdByName($user, "Personal") . "/"; + } + $davPath = WebDavHelper::getDavPath($user, $this->featureContext->getDavPathVersion()); + $headers['Destination'] = "{$baseUrl}/{$davPath}{$suffix}moved"; } foreach ($table->getHash() as $row) { diff --git a/tests/acceptance/features/bootstrap/FeatureContext.php b/tests/acceptance/features/bootstrap/FeatureContext.php index 0293466e0d..f6e76fe000 100644 --- a/tests/acceptance/features/bootstrap/FeatureContext.php +++ b/tests/acceptance/features/bootstrap/FeatureContext.php @@ -24,7 +24,6 @@ use Behat\Behat\Hook\Scope\BeforeStepScope; use GuzzleHttp\Exception\GuzzleException; -use Helmich\JsonAssert\JsonAssertions; use rdx\behatvars\BehatVariablesContext; use Behat\Behat\Hook\Scope\BeforeScenarioScope; use Behat\Behat\Hook\Scope\AfterScenarioScope; @@ -35,6 +34,7 @@ use Behat\Testwork\Hook\Scope\AfterSuiteScope; use GuzzleHttp\Cookie\CookieJar; use Psr\Http\Message\ResponseInterface; use PHPUnit\Framework\Assert; +use Swaggest\JsonSchema\Schema as JsonSchema; use TestHelpers\AppConfigHelper; use TestHelpers\OcsApiHelper; use TestHelpers\SetupHelper; @@ -55,7 +55,6 @@ class FeatureContext extends BehatVariablesContext { use Provisioning; use Sharing; use WebDav; - use JsonAssertions; /** * Unix timestamp seconds @@ -1207,6 +1206,117 @@ class FeatureContext extends BehatVariablesContext { return $a; } + /** + * Validates against the requirements that array schema should adhere to + * + * @param JsonSchema $schemaObj + * + * @return void + * @throws Exception + */ + private function validateSchemaArrayEntries(JsonSchema $schemaObj): void { + $hasTwoElementValidator = ($schemaObj->enum && $schemaObj->const) || ($schemaObj->enum && $schemaObj->items) || ($schemaObj->const && $schemaObj->items); + Assert::assertFalse($hasTwoElementValidator, "'items', 'enum' and 'const' should not be used together"); + if ($schemaObj->enum || $schemaObj->const) { + // do not try to validate of enum or const is present + return; + } + + $requiredValidators = ["maxItems", "minItems"]; + $optionalValidators = ["items", "uniqueItems"]; + $errMsg = "'%s' is required for array assertion"; + + // validate required keywords + foreach ($requiredValidators as $validator) { + Assert::assertNotNull($schemaObj->$validator, \sprintf($errMsg, $validator)); + } + + Assert::assertEquals($schemaObj->minItems, $schemaObj->maxItems, "'minItems' and 'maxItems' should be equal for strict assertion"); + + // validate optional keywords + foreach ($optionalValidators as $validator) { + $value = $schemaObj->$validator; + switch ($validator) { + case 'items': + if ($schemaObj->maxItems === 0) { + break; + } + Assert::assertNotNull($schemaObj->$validator, \sprintf($errMsg, $validator)); + if ($schemaObj->maxItems > 1) { + if (\is_array($value)) { + foreach ($value as $element) { + Assert::assertNotNull($element->oneOf, "'oneOf' is required to assert more than one elements"); + } + Assert::fail("'$validator' should be an object not an array"); + break; + } + Assert::assertFalse($value->allOf || $value->anyOf, "'allOf' and 'anyOf' are not allowed in array"); + Assert::assertNotNull($value->oneOf, "'oneOf' is required to assert more than one elements"); + Assert::assertTrue(\is_array($value->oneOf), "'oneOf' should be an array"); + Assert::assertEquals($schemaObj->maxItems, \count($value->oneOf), "There are more 'oneOf' elements than expected by 'maxItems'"); + } + Assert::assertTrue(\is_object($value), "'$validator' should be an object when expecting 1 element"); + break; + case "uniqueItems": + if ($schemaObj->minItems > 1) { + $errMsg = $value === null ? \sprintf($errMsg, $validator) : "'$validator' should be true"; + Assert::assertTrue($value, $errMsg); + } + break; + default: + break; + } + } + } + + /** + * Validates the json schema requirements + * + * @param JsonSchema $schema + * + * @return void + * @throws Exception + */ + public function validateSchemaRequirements(JsonSchema $schema): void { + $propNames = $schema->getPropertyNames(); + $props = $schema->getProperties(); + foreach ($propNames as $propName) { + switch ($props->$propName->type) { + case 'array': + $this->validateSchemaArrayEntries($props->$propName); + $items = $props->$propName->items; + if ($items && $items->oneOf) { + foreach ($items->oneOf as $oneOfItem) { + $this->validateSchemaRequirements($oneOfItem); + } + break; + } elseif ($items) { + $this->validateSchemaRequirements($items); + } + break; + default: + break; + } + // traverse for nested properties + if ($props->$propName->getProperties()) { + $this->validateSchemaRequirements($props->$propName); + } + } + } + + /** + * @param object $json + * @param object $schema + * + * @return void + * @throws Exception + */ + public function assertJsonDocumentMatchesSchema(object $json, object $schema): void { + $schema = JsonSchema::import($schema); + $this->validateSchemaRequirements($schema); + $schema->in($json); + } + /** * @When /^user "([^"]*)" sends HTTP method "([^"]*)" to URL "([^"]*)"$/ * @@ -1445,13 +1555,12 @@ class FeatureContext extends BehatVariablesContext { * @Then the JSON data of the response should match * * @param PyStringNode $schemaString - * @param ResponseInterface|null $response * * @return void * @throws Exception */ - public function theDataOfTheResponseShouldMatch(PyStringNode $schemaString, ResponseInterface $response=null): void { - $responseBody = $this->getJsonDecodedResponseBodyContent($response); + public function theJsonDataOfTheResponseShouldMatch(PyStringNode $schemaString): void { + $responseBody = $this->getJsonDecodedResponseBodyContent(); $this->assertJsonDocumentMatchesSchema( $responseBody, $this->getJSONSchema($schemaString) diff --git a/tests/acceptance/features/bootstrap/GraphContext.php b/tests/acceptance/features/bootstrap/GraphContext.php index b73ebbb6a2..bd3b35c52b 100644 --- a/tests/acceptance/features/bootstrap/GraphContext.php +++ b/tests/acceptance/features/bootstrap/GraphContext.php @@ -206,7 +206,11 @@ class GraphContext implements Context { */ public function theUserInformationShouldMatchTheJSON(string $user, PyStringNode $schemaString): void { $response = $this->adminHasRetrievedUserUsingTheGraphApi($user); - $this->featureContext->theDataOfTheResponseShouldMatch($schemaString, $response); + $responseBody = $this->featureContext->getJsonDecodedResponseBodyContent($response); + $this->featureContext->assertJsonDocumentMatchesSchema( + $responseBody, + $this->featureContext->getJSONSchema($schemaString) + ); } /** @@ -2526,6 +2530,30 @@ class GraphContext implements Context { ); } + /** + * + * @param string $user + * @param bool $waitForCacheExpiry + * + * @return void + */ + public function listSharesSharedByMe(string $user, bool $waitForCacheExpiry = false) { + $credentials = $this->getAdminOrUserCredentials($user); + if ($waitForCacheExpiry) { + // ENV (GRAPH_SPACES_GROUPS_CACHE_TTL | GRAPH_SPACES_USERS_CACHE_TTL) is set default to 60 sec + // which means 60 sec is required to clean up all the user|group cache once they are deleted + // for tests we have set the above ENV's to minimum which is 1 sec as we check the details for the deleted users + sleep(1); + } + $response = GraphHelper::getSharesSharedByMe( + $this->featureContext->getBaseUrl(), + $this->featureContext->getStepLineRef(), + $credentials['username'], + $credentials['password'] + ); + $this->featureContext->setResponse($response); + } + /** * @When user :user lists the shares shared by him/her using the Graph API * @@ -2535,15 +2563,19 @@ class GraphContext implements Context { * @throws GuzzleException */ public function userListsTheResourcesSharedByAUserUsingGraphApi(string $user): void { - $credentials = $this->getAdminOrUserCredentials($user); - $this->featureContext->setResponse( - GraphHelper::getSharesSharedByMe( - $this->featureContext->getBaseUrl(), - $this->featureContext->getStepLineRef(), - $credentials['username'], - $credentials['password'] - ) - ); + $this->listSharesSharedByMe($user); + } + + /** + * @When user :user lists the shares shared by him/her after clearing user/group cache using the Graph API + * + * @param string $user + * + * @return void + * @throws GuzzleException + */ + public function userListsTheResourcesSharedByAUserAfterClearingUserOrGroupSpaceUsingGraphApi(string $user): void { + $this->listSharesSharedByMe($user, true); } /** diff --git a/tests/acceptance/features/bootstrap/PublicWebDavContext.php b/tests/acceptance/features/bootstrap/PublicWebDavContext.php index 38e9910666..1c4bd50fe4 100644 --- a/tests/acceptance/features/bootstrap/PublicWebDavContext.php +++ b/tests/acceptance/features/bootstrap/PublicWebDavContext.php @@ -115,6 +115,19 @@ class PublicWebDavContext implements Context { $this->featureContext->setResponse($response); } + /** + * @When /^user "([^"]*)" tries to download file "([^"]*)" from the last public link using own basic auth and new public WebDAV API$/ + * + * @param string $user + * @param string $path + * + * @return void + */ + public function userTriesToDownloadFileFromPublicLinkUsingBasicAuthAndPublicWebdav(string $user, string $path): void { + $response = $this->downloadFromPublicLinkAsUser($path, $user); + $this->featureContext->setResponse($response); + } + /** * @When /^the public deletes (?:file|folder|entry) "([^"]*)" from the last public link share using the (old|new) public WebDAV API$/ * @@ -283,6 +296,38 @@ class PublicWebDavContext implements Context { $this->featureContext->setResponse($response); } + /** + * @param string $path + * @param string $user + * @param bool $shareNg + * + * @return ResponseInterface + */ + public function downloadFromPublicLinkAsUser(string $path, string $user, bool $shareNg = false): ResponseInterface { + $path = \ltrim($path, "/"); + if ($shareNg) { + $token = $this->featureContext->shareNgGetLastCreatedLinkShareToken(); + } else { + $token = $this->featureContext->getLastCreatedPublicShareToken(); + } + + $davPath = WebDavHelper::getDavPath( + $token, + 0, + "public-files-new" + ); + + $username = $this->featureContext->getActualUsername($user); + $password = $this->featureContext->getPasswordForUser($user); + $fullUrl = $this->featureContext->getBaseUrl() . "/$davPath$path"; + + return HttpRequestHelper::get( + $fullUrl, + $this->featureContext->getStepLineRef(), + $username, + $password + ); + } /** * @param string $path * @param string $password diff --git a/tests/acceptance/features/bootstrap/SharingNgContext.php b/tests/acceptance/features/bootstrap/SharingNgContext.php index 4c6453ea1d..bd33bc4167 100644 --- a/tests/acceptance/features/bootstrap/SharingNgContext.php +++ b/tests/acceptance/features/bootstrap/SharingNgContext.php @@ -262,11 +262,11 @@ class SharingNgContext implements Context { $body = []; if (\array_key_exists('permissionsRole', $bodyRows)) { - $body["roles"] = [GraphHelper::getPermissionsRoleIdByName($bodyRows['permissionsRole'])]; + $body['roles'] = [GraphHelper::getPermissionsRoleIdByName($bodyRows['permissionsRole'])]; } if (\array_key_exists('expirationDateTime', $bodyRows)) { - $body["expirationDateTime"] = $bodyRows['expirationDateTime']; + $body['expirationDateTime'] = empty($bodyRows['expirationDateTime']) ? null : $bodyRows['expirationDateTime']; } return GraphHelper::updateShare( @@ -357,16 +357,16 @@ class SharingNgContext implements Context { $bodyRows = $body->getRowsHash(); $space = $bodyRows['space']; $resource = $bodyRows['resource']; - $spaceId = ($this->spacesContext->getSpaceByName($user, $space))["id"]; + $spaceId = ($this->spacesContext->getSpaceByName($user, $space))['id']; $itemId = $this->spacesContext->getResourceId($user, $space, $resource); $body = []; if (\array_key_exists('permissionsRole', $bodyRows)) { - $body["link"]["type"] = $bodyRows['permissionsRole']; + $body['link']['type'] = $bodyRows['permissionsRole']; } if (\array_key_exists('expirationDateTime', $bodyRows)) { - $body["expirationDateTime"] = $bodyRows['expirationDateTime']; + $body['expirationDateTime'] = empty($bodyRows['expirationDateTime']) ? null : $bodyRows['expirationDateTime']; } return GraphHelper::updateShare( diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index ea11978691..6ce5bd0b2d 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -2048,7 +2048,7 @@ class SpacesContext implements Context { if ($toSpaceName === 'Shares') { $sharesPath = $this->featureContext->getSharesMountPath($user, $fileDestination); $davPath = WebDavHelper::getDavPath($user, $this->featureContext->getDavPathVersion()); - $headers['Destination'] = $baseUrl . $davPath . $sharesPath; + $headers['Destination'] = $baseUrl . "/$davPath" . $sharesPath; } else { $headers['Destination'] = $this->destinationHeaderValueWithSpaceName($user, $fileDestination, $toSpaceName, $url); } @@ -2060,6 +2060,48 @@ class SpacesContext implements Context { } } + /** + * @When /^user "([^"]*)" tries to move (?:file|folder) "([^"]*)" of space "([^"]*)" to (space|folder) "([^"]*)" using its id in destination path "([^"]*)"$/ + * @When /^user "([^"]*)" moves (?:file|folder) "([^"]*)" of space "([^"]*)" to (folder) "([^"]*)" using its id in destination path "([^"]*)"$/ + * + * @param string $user + * @param string $source + * @param string $sourceSpace + * @param string $destinationType + * @param string $destinationName + * @param string $destinationPath + * + * @throws GuzzleException + * @return void + */ + public function userMovesFileToResourceUsingItsIdAsDestinationPath( + string $user, + string $source, + string $sourceSpace, + string $destinationType, + string $destinationName, + string $destinationPath + ): void { + $source = \trim($source, "/"); + $baseUrl = $this->featureContext->getBaseUrl(); + $suffix = ""; + if ($this->featureContext->getDavPathVersion() === WebDavHelper::DAV_VERSION_SPACES) { + $suffix = $this->getSpaceIdByName($user, $sourceSpace) . "/"; + } + $fullUrl = $baseUrl . \rtrim($destinationPath, "/") . "/{$suffix}{$source}"; + + $destinationId = ""; + if ($destinationType === "space") { + $destinationId = $this->getSpaceIdByName($user, $destinationName); + } else { + $destinationId = $this->getResourceId($user, $sourceSpace, $destinationName); + } + $headers['Destination'] = $baseUrl . \rtrim($destinationPath, "/") . "/$destinationId"; + + $response = $this->moveFilesAndFoldersRequest($user, $fullUrl, $headers); + $this->featureContext->setResponse($response); + } + /** * @Given /^user "([^"]*)" has uploaded a file inside space "([^"]*)" with content "([^"]*)" to "([^"]*)"$/ * @@ -2189,6 +2231,11 @@ class SpacesContext implements Context { "role" => $rows["role"] ]; + // share with custom permission + if (isset($rows["permissions"])) { + $body["permissions"] = $rows["permissions"]; + } + $fullUrl = $this->baseUrl . $this->ocsApiUrl; $response = $this->sendPostRequestToUrl( $fullUrl, diff --git a/tests/acceptance/features/bootstrap/SpacesTUSContext.php b/tests/acceptance/features/bootstrap/SpacesTUSContext.php index ff594dfca7..6b82c66d98 100644 --- a/tests/acceptance/features/bootstrap/SpacesTUSContext.php +++ b/tests/acceptance/features/bootstrap/SpacesTUSContext.php @@ -286,6 +286,29 @@ class SpacesTUSContext implements Context { $this->tusContext->userUploadsChunkFileWithChecksum($user, $offset, $data, $checksum); } + /** + * @When /^user "([^"]*)" sends a chunk to the last created TUS Location with data "([^"]*)" inside of the space "([^"]*)" with headers:$/ + * + * @param string $user + * @param string $data + * @param string $spaceName + * @param TableNode $headers + * + * @return void + * @throws Exception|GuzzleException + */ + public function userSendsAChunkToTheLastCreatedTusLocationWithDataInsideOfTheSpaceWithHeaders( + string $user, + string $data, + string $spaceName, + TableNode $headers + ): void { + $this->spacesContext->setSpaceIDByName($user, $spaceName); + $rows = $headers->getRowsHash(); + $response = $this->tusContext->sendsAChunkToTUSLocationWithOffsetAndData($user, $rows['Upload-Offset'], $data, $rows['Upload-Checksum'], ['Origin' => $rows['Origin']]); + $this->featureContext->setResponse($response); + } + /** * @When /^user "([^"]*)" overwrites recently shared file with offset "([^"]*)" and data "([^"]*)" with checksum "([^"]*)" via TUS inside of the space "([^"]*)" using the WebDAV API with these headers:$/ * diff --git a/tests/acceptance/features/bootstrap/TUSContext.php b/tests/acceptance/features/bootstrap/TUSContext.php index 7b74fd5194..ef2292bdc8 100644 --- a/tests/acceptance/features/bootstrap/TUSContext.php +++ b/tests/acceptance/features/bootstrap/TUSContext.php @@ -116,27 +116,31 @@ class TUSContext implements Context { * @param string $offset * @param string $data * @param string $checksum + * @param array|null $extraHeaders * * @return ResponseInterface * * @throws GuzzleException * @throws JsonException */ - public function sendsAChunkToTUSLocationWithOffsetAndData(string $user, string $offset, string $data, string $checksum = ''): ResponseInterface { + public function sendsAChunkToTUSLocationWithOffsetAndData(string $user, string $offset, string $data, string $checksum = '', ?array $extraHeaders = null): ResponseInterface { $user = $this->featureContext->getActualUsername($user); $password = $this->featureContext->getUserPassword($user); + $headers = [ + 'Content-Type' => 'application/offset+octet-stream', + 'Tus-Resumable' => '1.0.0', + 'Upload-Checksum' => $checksum, + 'Upload-Offset' => $offset + ]; + $headers = empty($extraHeaders) ? $headers : array_merge($headers, $extraHeaders); + return HttpRequestHelper::sendRequest( $this->resourceLocation, $this->featureContext->getStepLineRef(), 'PATCH', $user, $password, - [ - 'Content-Type' => 'application/offset+octet-stream', - 'Tus-Resumable' => '1.0.0', - 'Upload-Checksum' => $checksum, - 'Upload-Offset' => $offset - ], + $headers, $data ); } diff --git a/tests/acceptance/features/bootstrap/WebDav.php b/tests/acceptance/features/bootstrap/WebDav.php index 03e15d2d3d..3bb34b0e00 100644 --- a/tests/acceptance/features/bootstrap/WebDav.php +++ b/tests/acceptance/features/bootstrap/WebDav.php @@ -1752,9 +1752,12 @@ trait WebDav { } else { $actualResourceType = "folder"; } - Assert::fail( - "$entry '$path' should not exist. But it does exist and is a $actualResourceType" - ); + + if ($entry === $actualResourceType) { + Assert::fail( + "$entry '$path' should not exist. But it does." + ); + } } } @@ -4997,7 +5000,7 @@ trait WebDav { $sharesPath = $this->getSharesMountPath($user, $path) . '/?' . $urlParameter; $davPath = WebDavHelper::getDavPath($user, $this->getDavPathVersion()); - $fullUrl = $this->getBaseUrl() . $davPath . $sharesPath; + $fullUrl = $this->getBaseUrl() . "/$davPath" . $sharesPath; return HttpRequestHelper::sendRequest( $fullUrl, @@ -5024,7 +5027,7 @@ trait WebDav { $sharesPath = $this->getSharesMountPath($user, $destination); $davPath = WebDavHelper::getDavPath($user, $this->getDavPathVersion()); - $fullUrl = $this->getBaseUrl() . $davPath . $sharesPath; + $fullUrl = $this->getBaseUrl() . "/$davPath" . $sharesPath; return HttpRequestHelper::sendRequest( $fullUrl, @@ -5763,7 +5766,7 @@ trait WebDav { if ($entryNameToSearch !== null) { $entryNameToSearch = \trim($entryNameToSearch, "/"); } - $spacesBaseUrl = webDavHelper::getDavPath(null, webDavHelper::DAV_VERSION_SPACES); + $spacesBaseUrl = "/" . webDavHelper::getDavPath(null, webDavHelper::DAV_VERSION_SPACES); $searchResults = $this->getResponseXml()->xpath("//d:multistatus/d:response"); $results = []; foreach ($searchResults as $item) { diff --git a/tests/acceptance/features/coreApiAuth/webDavCOPYAuth.feature b/tests/acceptance/features/coreApiAuth/webDavCOPYAuth.feature index 61051b484a..ef611fbb1f 100644 --- a/tests/acceptance/features/coreApiAuth/webDavCOPYAuth.feature +++ b/tests/acceptance/features/coreApiAuth/webDavCOPYAuth.feature @@ -12,6 +12,7 @@ Feature: COPY file/folder And user "Alice" has created folder "/PARENT" And user "Alice" has created folder "/FOLDER" And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt" + And using new DAV path @smokeTest Scenario: send COPY requests to webDav endpoints as normal user with wrong password @@ -41,23 +42,24 @@ Feature: COPY file/folder | /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt | Then the HTTP status code of responses on all endpoints should be "401" - + @issue-3882 Scenario: send COPY requests to another user's webDav endpoints as normal user When user "Brian" requests these endpoints with "COPY" about user "Alice" | endpoint | | /remote.php/dav/files/%username%/textfile0.txt | | /remote.php/dav/files/%username%/PARENT | | /remote.php/dav/files/%username%/PARENT/parent.txt | - Then the HTTP status code of responses on all endpoints should be "403" + Then the HTTP status code of responses on all endpoints should be "404" - @skipOnRevaMaster + @skipOnRevaMaster @issue-3882 Scenario: send COPY requests to another user's webDav endpoints as normal user using the spaces WebDAV API + Given using spaces DAV path When user "Brian" requests these endpoints with "COPY" about user "Alice" | endpoint | | /remote.php/dav/spaces/%spaceid%/textfile0.txt | | /remote.php/dav/spaces/%spaceid%/PARENT | | /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt | - Then the HTTP status code of responses on all endpoints should be "403" + Then the HTTP status code of responses on all endpoints should be "404" Scenario: send COPY requests to webDav endpoints using invalid username but correct password @@ -101,7 +103,7 @@ Feature: COPY file/folder | /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt | Then the HTTP status code of responses on all endpoints should be "401" - + @issue-4332 @issue-3882 Scenario: send COPY requests to webDav endpoints with body as normal user When user "Alice" requests these endpoints with "COPY" including body "doesnotmatter" about user "Alice" | endpoint | @@ -113,7 +115,7 @@ Feature: COPY file/folder | /remote.php/dav/files/%username%/PARENT/parent.txt | Then the HTTP status code of responses on all endpoints should be "415" - @skipOnRevaMaster + @skipOnRevaMaster @issue-4332 @issue-3882 Scenario: send COPY requests to webDav endpoints with body as normal user using the spaces WebDAV API When user "Alice" requests these endpoints with "COPY" including body "doesnotmatter" about user "Alice" | endpoint | diff --git a/tests/acceptance/features/coreApiAuth/webDavDELETEAuth.feature b/tests/acceptance/features/coreApiAuth/webDavDELETEAuth.feature index 43e04058e6..ae320d2a4d 100644 --- a/tests/acceptance/features/coreApiAuth/webDavDELETEAuth.feature +++ b/tests/acceptance/features/coreApiAuth/webDavDELETEAuth.feature @@ -104,7 +104,7 @@ Feature: delete file/folder | /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt | Then the HTTP status code of responses on all endpoints should be "401" - + @issue-4332 Scenario: send DELETE requests to webDav endpoints with body as normal user When user "Alice" requests these endpoints with "DELETE" including body "doesnotmatter" about user "Alice" | endpoint | @@ -115,7 +115,7 @@ Feature: delete file/folder | /remote.php/dav/files/%username%/FOLDER | Then the HTTP status code of responses on all endpoints should be "415" - @skipOnRevaMaster + @skipOnRevaMaster @issue-4332 Scenario: send DELETE requests to webDav endpoints with body as normal user using the spaces WebDAV API When user "Alice" requests these endpoints with "DELETE" including body "doesnotmatter" about user "Alice" | endpoint | diff --git a/tests/acceptance/features/coreApiAuth/webDavMOVEAuth.feature b/tests/acceptance/features/coreApiAuth/webDavMOVEAuth.feature index 6f980e6243..d8839985c8 100644 --- a/tests/acceptance/features/coreApiAuth/webDavMOVEAuth.feature +++ b/tests/acceptance/features/coreApiAuth/webDavMOVEAuth.feature @@ -12,6 +12,7 @@ Feature: MOVE file/folder And user "Alice" has created folder "/PARENT" And user "Alice" has created folder "/FOLDER" And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt" + And using new DAV path @smokeTest Scenario: send MOVE requests to webDav endpoints as normal user with wrong password @@ -41,23 +42,24 @@ Feature: MOVE file/folder | /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt | Then the HTTP status code of responses on all endpoints should be "401" - + @issue-3882 Scenario: send MOVE requests to another user's webDav endpoints as normal user When user "Brian" requests these endpoints with "MOVE" about user "Alice" | endpoint | | /remote.php/dav/files/%username%/textfile0.txt | | /remote.php/dav/files/%username%/PARENT | | /remote.php/dav/files/%username%/PARENT/parent.txt | - Then the HTTP status code of responses on all endpoints should be "403" + Then the HTTP status code of responses on all endpoints should be "404" - @skipOnRevaMaster + @skipOnRevaMaster @issue-3882 Scenario: send MOVE requests to another user's webDav endpoints as normal user using the spaces WebDAV API + Given using spaces DAV path When user "Brian" requests these endpoints with "MOVE" about user "Alice" | endpoint | | /remote.php/dav/spaces/%spaceid%/textfile0.txt | | /remote.php/dav/spaces/%spaceid%/PARENT | | /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt | - Then the HTTP status code of responses on all endpoints should be "403" + Then the HTTP status code of responses on all endpoints should be "404" Scenario: send MOVE requests to webDav endpoints using invalid username but correct password @@ -101,7 +103,7 @@ Feature: MOVE file/folder | /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt | Then the HTTP status code of responses on all endpoints should be "401" - + @issue-4332 @issue-3882 Scenario: send MOVE requests to webDav endpoints with body as normal user When user "Alice" requests these endpoints with "MOVE" including body "doesnotmatter" about user "Alice" | endpoint | @@ -113,7 +115,7 @@ Feature: MOVE file/folder | /remote.php/dav/files/%username%/PARENT/parent.txt | Then the HTTP status code of responses on all endpoints should be "415" - @skipOnRevaMaster + @skipOnRevaMaster @issue-4332 @issue-3882 Scenario: send MOVE requests to webDav endpoints with body as normal user using the spaces WebDAV API When user "Alice" requests these endpoints with "MOVE" including body "doesnotmatter" about user "Alice" | endpoint | diff --git a/tests/acceptance/features/coreApiCapabilities/capabilities.feature b/tests/acceptance/features/coreApiCapabilities/capabilities.feature index 8e6e78ac2b..410f0d87a7 100644 --- a/tests/acceptance/features/coreApiCapabilities/capabilities.feature +++ b/tests/acceptance/features/coreApiCapabilities/capabilities.feature @@ -198,6 +198,7 @@ Feature: capabilities "blacklisted_files": { "type": "array", "minItems": 1, + "maxItems": 1, "items": { "type": "string", "enum": [".htaccess"] diff --git a/tests/acceptance/features/coreApiSharePublicLink1/accessToPublicLinkShare.feature b/tests/acceptance/features/coreApiSharePublicLink1/accessToPublicLinkShare.feature index 3e08f07ce5..7c18cbaa60 100644 --- a/tests/acceptance/features/coreApiSharePublicLink1/accessToPublicLinkShare.feature +++ b/tests/acceptance/features/coreApiSharePublicLink1/accessToPublicLinkShare.feature @@ -57,3 +57,14 @@ Feature: accessing a public link share | testavatar.jpg | | textfile0.txt | Then the HTTP status code of responses on all endpoints should be "200" + + @issue-web-10473 + Scenario: user tries to download public link file using own basic auth + And user "Alice" has created folder "FOLDER" + And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "FOLDER/textfile.txt" + And user "Alice" has created a public link share with settings + | path | FOLDER | + | permissions | change | + | password | %public% | + When user "Alice" tries to download file "textfile.txt" from the last public link using own basic auth and new public WebDAV API + Then the HTTP status code should be "401" diff --git a/vendor-bin/behat/composer.json b/vendor-bin/behat/composer.json index ba9779e161..0192865a4d 100644 --- a/vendor-bin/behat/composer.json +++ b/vendor-bin/behat/composer.json @@ -22,6 +22,6 @@ "laminas/laminas-ldap": "^2.15", "ankitpokhrel/tus-php": "^2.3", "wapmorgan/unified-archive": "^1.1.10", - "helmich/phpunit-json-assert": "^3.4" + "swaggest/json-schema": "^0.12.42" } } diff --git a/vendor/github.com/asaskevich/govalidator/validator.go b/vendor/github.com/asaskevich/govalidator/validator.go index 46ecfc84a4..c9c4fac065 100644 --- a/vendor/github.com/asaskevich/govalidator/validator.go +++ b/vendor/github.com/asaskevich/govalidator/validator.go @@ -454,27 +454,26 @@ func IsCreditCard(str string) bool { if !rxCreditCard.MatchString(sanitized) { return false } - var sum int64 - var digit string - var tmpNum int64 - var shouldDouble bool - for i := len(sanitized) - 1; i >= 0; i-- { - digit = sanitized[i:(i + 1)] - tmpNum, _ = ToInt(digit) - if shouldDouble { - tmpNum *= 2 - if tmpNum >= 10 { - sum += (tmpNum % 10) + 1 - } else { - sum += tmpNum - } - } else { - sum += tmpNum - } - shouldDouble = !shouldDouble - } + + number, _ := ToInt(sanitized) + number, lastDigit := number / 10, number % 10 - return sum%10 == 0 + var sum int64 + for i:=0; number > 0; i++ { + digit := number % 10 + + if i % 2 == 0 { + digit *= 2 + if digit > 9 { + digit -= 9 + } + } + + sum += digit + number = number / 10 + } + + return (sum + lastDigit) % 10 == 0 } // IsISBN10 checks if the string is an ISBN version 10. diff --git a/vendor/github.com/beevik/etree/CONTRIBUTORS b/vendor/github.com/beevik/etree/CONTRIBUTORS index da47407673..7ae36d4f62 100644 --- a/vendor/github.com/beevik/etree/CONTRIBUTORS +++ b/vendor/github.com/beevik/etree/CONTRIBUTORS @@ -10,3 +10,4 @@ Earncef Sequeira (earncef) Gabriel de Labachelerie (wuzuf) Martin Dosch (mdosch) Hugo Wetterberg (hugowetterberg) +Tobias Theel (nerzal) diff --git a/vendor/github.com/beevik/etree/README.md b/vendor/github.com/beevik/etree/README.md index 62f0babcba..98a4518398 100644 --- a/vendor/github.com/beevik/etree/README.md +++ b/vendor/github.com/beevik/etree/README.md @@ -1,4 +1,5 @@ [![GoDoc](https://godoc.org/github.com/beevik/etree?status.svg)](https://godoc.org/github.com/beevik/etree) +[![Go](https://github.com/beevik/etree/actions/workflows/go.yml/badge.svg)](https://github.com/beevik/etree/actions/workflows/go.yml) etree ===== diff --git a/vendor/github.com/beevik/etree/RELEASE_NOTES.md b/vendor/github.com/beevik/etree/RELEASE_NOTES.md index 4a2ce2ab2d..0194dcd2cd 100644 --- a/vendor/github.com/beevik/etree/RELEASE_NOTES.md +++ b/vendor/github.com/beevik/etree/RELEASE_NOTES.md @@ -1,3 +1,12 @@ +Release v1.3.0 +============== + +**New Features** + +* Add support for double-quotes in filter path queries. +* Add `PreserveDuplicateAttrs` to `ReadSettings`. +* Add `ReindexChildren` to `Element`. + Release v1.2.0 ============== diff --git a/vendor/github.com/beevik/etree/etree.go b/vendor/github.com/beevik/etree/etree.go index 83df8b2f46..f5b99f5f28 100644 --- a/vendor/github.com/beevik/etree/etree.go +++ b/vendor/github.com/beevik/etree/etree.go @@ -46,6 +46,10 @@ type ReadSettings struct { // false. PreserveCData bool + // When an element has two or more attributes with the same name, + // preserve them instead of keeping only one. Default: false. + PreserveDuplicateAttrs bool + // Entity to be passed to standard xml.Decoder. Default: nil. Entity map[string]string } @@ -549,6 +553,15 @@ func (e *Element) name() string { return e.Tag } +// ReindexChildren recalculates the index values of the element's child +// tokens. This is necessary only if you have manually manipulated the +// element's `Child` array. +func (e *Element) ReindexChildren() { + for i := 0; i < len(e.Child); i++ { + e.Child[i].setIndex(i) + } +} + // Text returns all character data immediately following the element's opening // tag. func (e *Element) Text() string { @@ -827,7 +840,7 @@ func (e *Element) readFrom(ri io.Reader, settings ReadSettings) (n int64, err er case xml.StartElement: e := newElement(t.Name.Space, t.Name.Local, top) for _, a := range t.Attr { - e.createAttr(a.Name.Space, a.Name.Local, a.Value, e) + e.createAttr(a.Name.Space, a.Name.Local, a.Value, e, settings.PreserveDuplicateAttrs) } stack.push(e) case xml.EndElement: @@ -1223,17 +1236,20 @@ func (e *Element) addChild(t Token) { // prefix followed by a colon. func (e *Element) CreateAttr(key, value string) *Attr { space, skey := spaceDecompose(key) - return e.createAttr(space, skey, value, e) + return e.createAttr(space, skey, value, e, false) } // createAttr is a helper function that creates attributes. -func (e *Element) createAttr(space, key, value string, parent *Element) *Attr { - for i, a := range e.Attr { - if space == a.Space && key == a.Key { - e.Attr[i].Value = value - return &e.Attr[i] +func (e *Element) createAttr(space, key, value string, parent *Element, preserveDups bool) *Attr { + if !preserveDups { + for i, a := range e.Attr { + if space == a.Space && key == a.Key { + e.Attr[i].Value = value + return &e.Attr[i] + } } } + a := Attr{ Space: space, Key: key, diff --git a/vendor/github.com/beevik/etree/helpers.go b/vendor/github.com/beevik/etree/helpers.go index b31fd754c1..0b7c4ec27d 100644 --- a/vendor/github.com/beevik/etree/helpers.go +++ b/vendor/github.com/beevik/etree/helpers.go @@ -299,10 +299,10 @@ func indentLF(n int, source string) string { } } -// nextIndex returns the index of the next occurrence of sep in s, -// starting from offset. It returns -1 if the sep string is not found. -func nextIndex(s, sep string, offset int) int { - switch i := strings.Index(s[offset:], sep); i { +// nextIndex returns the index of the next occurrence of byte ch in s, +// starting from offset. It returns -1 if the byte is not found. +func nextIndex(s string, ch byte, offset int) int { + switch i := strings.IndexByte(s[offset:], ch); i { case -1: return -1 default: diff --git a/vendor/github.com/beevik/etree/path.go b/vendor/github.com/beevik/etree/path.go index a6d67acee3..491dfc6e82 100644 --- a/vendor/github.com/beevik/etree/path.go +++ b/vendor/github.com/beevik/etree/path.go @@ -242,12 +242,17 @@ func splitPath(path string) []string { var pieces []string start := 0 inquote := false + var quote byte for i := 0; i+1 <= len(path); i++ { - if path[i] == '\'' { - inquote = !inquote - } else if path[i] == '/' && !inquote { - pieces = append(pieces, path[start:i]) - start = i + 1 + if !inquote { + if path[i] == '\'' || path[i] == '"' { + inquote, quote = true, path[i] + } else if path[i] == '/' { + pieces = append(pieces, path[start:i]) + start = i + 1 + } + } else if path[i] == quote { + inquote = false } } return append(pieces, path[start:]) @@ -302,30 +307,34 @@ func (c *compiler) parseFilter(path string) filter { return nil } - // Filter contains [@attr='val'], [fn()='val'], or [tag='val']? - eqindex := strings.Index(path, "='") - if eqindex >= 0 { - rindex := nextIndex(path, "'", eqindex+2) - if rindex != len(path)-1 { - c.err = ErrPath("path has mismatched filter quotes.") - return nil - } - - key := path[:eqindex] - value := path[eqindex+2 : rindex] - - switch { - case key[0] == '@': - return newFilterAttrVal(key[1:], value) - case strings.HasSuffix(key, "()"): - name := key[:len(key)-2] - if fn, ok := fnTable[name]; ok { - return newFilterFuncVal(fn, value) + // Filter contains [@attr='val'], [@attr="val"], [fn()='val'], + // [fn()="val"], [tag='val'] or [tag="val"]? + eqindex := strings.IndexByte(path, '=') + if eqindex >= 0 && eqindex+1 < len(path) { + quote := path[eqindex+1] + if quote == '\'' || quote == '"' { + rindex := nextIndex(path, quote, eqindex+2) + if rindex != len(path)-1 { + c.err = ErrPath("path has mismatched filter quotes.") + return nil + } + + key := path[:eqindex] + value := path[eqindex+2 : rindex] + + switch { + case key[0] == '@': + return newFilterAttrVal(key[1:], value) + case strings.HasSuffix(key, "()"): + name := key[:len(key)-2] + if fn, ok := fnTable[name]; ok { + return newFilterFuncVal(fn, value) + } + c.err = ErrPath("path has unknown function " + name) + return nil + default: + return newFilterChildText(key, value) } - c.err = ErrPath("path has unknown function " + name) - return nil - default: - return newFilterChildText(key, value) } } diff --git a/vendor/github.com/coreos/go-oidc/.gitignore b/vendor/github.com/coreos/go-oidc/.gitignore deleted file mode 100644 index c96f2f47bc..0000000000 --- a/vendor/github.com/coreos/go-oidc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/bin -/gopath diff --git a/vendor/github.com/coreos/go-oidc/.travis.yml b/vendor/github.com/coreos/go-oidc/.travis.yml deleted file mode 100644 index 3fddaaac90..0000000000 --- a/vendor/github.com/coreos/go-oidc/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: go - -go: - - "1.12" - - "1.13" - -install: - - go get -v -t github.com/coreos/go-oidc/... - - go get golang.org/x/tools/cmd/cover - - go get golang.org/x/lint/golint - -script: - - ./test - -notifications: - email: false diff --git a/vendor/github.com/coreos/go-oidc/CONTRIBUTING.md b/vendor/github.com/coreos/go-oidc/CONTRIBUTING.md deleted file mode 100644 index 6662073a84..0000000000 --- a/vendor/github.com/coreos/go-oidc/CONTRIBUTING.md +++ /dev/null @@ -1,71 +0,0 @@ -# How to Contribute - -CoreOS projects are [Apache 2.0 licensed](LICENSE) and accept contributions via -GitHub pull requests. This document outlines some of the conventions on -development workflow, commit message formatting, contact points and other -resources to make it easier to get your contribution accepted. - -# Certificate of Origin - -By contributing to this project you agree to the Developer Certificate of -Origin (DCO). This document was created by the Linux Kernel community and is a -simple statement that you, as a contributor, have the legal right to make the -contribution. See the [DCO](DCO) file for details. - -# Email and Chat - -The project currently uses the general CoreOS email list and IRC channel: -- Email: [coreos-dev](https://groups.google.com/forum/#!forum/coreos-dev) -- IRC: #[coreos](irc://irc.freenode.org:6667/#coreos) IRC channel on freenode.org - -Please avoid emailing maintainers found in the MAINTAINERS file directly. They -are very busy and read the mailing lists. - -## Getting Started - -- Fork the repository on GitHub -- Read the [README](README.md) for build and test instructions -- Play with the project, submit bugs, submit patches! - -## Contribution Flow - -This is a rough outline of what a contributor's workflow looks like: - -- Create a topic branch from where you want to base your work (usually master). -- Make commits of logical units. -- Make sure your commit messages are in the proper format (see below). -- Push your changes to a topic branch in your fork of the repository. -- Make sure the tests pass, and add any new tests as appropriate. -- Submit a pull request to the original repository. - -Thanks for your contributions! - -### Format of the Commit Message - -We follow a rough convention for commit messages that is designed to answer two -questions: what changed and why. The subject line should feature the what and -the body of the commit should describe the why. - -``` -scripts: add the test-cluster command - -this uses tmux to setup a test cluster that you can easily kill and -start for debugging. - -Fixes #38 -``` - -The format can be described more formally as follows: - -``` -: - - - -