diff --git a/.drone.star b/.drone.star index 7cccd9c4dfb..f26b1009539 100644 --- a/.drone.star +++ b/.drone.star @@ -164,27 +164,34 @@ config = { ], "skip": False, }, - "sharingNg": { + "sharingNg1": { "suites": [ + "apiSharingNgShares", + ], + "skip": False, + "withRemotePhp": [True], + }, + "sharingNg2": { + "suites": [ + "apiSharingNgPermissions", "apiReshare", - "apiSharingNg1", - "apiSharingNg2", - "apiOptionalShareRole", + "apiSharingNgAdditionalShareRole", ], "skip": False, "withRemotePhp": [True], }, "sharingNgShareInvitation": { "suites": [ - "apiSharingNgShareInvitation", + "apiSharingNgDriveInvitation", + "apiSharingNgItemInvitation", ], "skip": False, "withRemotePhp": [True], }, "sharingNgLinkShare": { "suites": [ - "apiSharingNgLinkSharePermission", - "apiSharingNgLinkShareRoot", + "apiSharingNgDriveLinkShare", + "apiSharingNgItemLinkShare", ], "skip": False, "withRemotePhp": [True], diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index 542eb011cbd..b5d850e7921 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -349,9 +349,9 @@ default: - SharingNgContext: - OcisConfigContext: - apiSharingNg1: + apiSharingNgPermissions: paths: - - "%paths.base%/../features/apiSharingNg1" + - "%paths.base%/../features/apiSharingNgPermissions" context: *common_ldap_suite_context contexts: - FeatureContext: *common_feature_context_params @@ -360,9 +360,9 @@ default: - OcisConfigContext: - SettingsContext: - apiSharingNg2: + apiSharingNgShares: paths: - - "%paths.base%/../features/apiSharingNg2" + - "%paths.base%/../features/apiSharingNgShares" context: *common_ldap_suite_context contexts: - FeatureContext: *common_feature_context_params @@ -371,6 +371,59 @@ default: - OcisConfigContext: - SettingsContext: + apiSharingNgDriveInvitation: + paths: + - "%paths.base%/../features/apiSharingNgDriveInvitation" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - SpacesContext: + - SharingNgContext: + - OcisConfigContext: + - SettingsContext: + + apiSharingNgItemInvitation: + paths: + - "%paths.base%/../features/apiSharingNgItemInvitation" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - SpacesContext: + - SharingNgContext: + - OcisConfigContext: + + apiSharingNgItemLinkShare: + paths: + - "%paths.base%/../features/apiSharingNgItemLinkShare" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - SpacesContext: + - SharingNgContext: + - PublicWebDavContext: + - OcisConfigContext: + + apiSharingNgDriveLinkShare: + paths: + - "%paths.base%/../features/apiSharingNgDriveLinkShare" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - SpacesContext: + - SharingNgContext: + - PublicWebDavContext: + - OcisConfigContext: + + apiSharingNgAdditionalShareRole: + paths: + - "%paths.base%/../features/apiSharingNgAdditionalShareRole" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - GraphContext: + - SharingNgContext: + - OcisConfigContext: + apiSettings: paths: - "%paths.base%/../features/apiSettings" @@ -384,48 +437,6 @@ default: - EmailContext: - OcisConfigContext: - apiOptionalShareRole: - paths: - - "%paths.base%/../features/apiOptionalShareRole" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - GraphContext: - - SharingNgContext: - - OcisConfigContext: - - apiSharingNgShareInvitation: - paths: - - "%paths.base%/../features/apiSharingNgShareInvitation" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - SpacesContext: - - SharingNgContext: - - OcisConfigContext: - - apiSharingNgLinkSharePermission: - paths: - - "%paths.base%/../features/apiSharingNgLinkSharePermission" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - SpacesContext: - - SharingNgContext: - - PublicWebDavContext: - - OcisConfigContext: - - apiSharingNgLinkShareRoot: - paths: - - "%paths.base%/../features/apiSharingNgLinkShareRoot" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - SpacesContext: - - SharingNgContext: - - PublicWebDavContext: - - OcisConfigContext: - apiOcm: paths: - "%paths.base%/../features/apiOcm" diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index 40644f2249e..7e5c1ceab08 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -173,57 +173,56 @@ The expected failures in this file are from features in the owncloud/ocis repo. - [apiLocks/lockFiles.feature:557](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/lockFiles.feature#L557) #### [blocksDownload link type is not implemented yet (sharing-ng)](https://github.com/owncloud/ocis/issues/7879) - -- [apiSharingNgLinkSharePermission/createLinkShare.feature:72](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L72) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:202](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L202) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:340](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L340) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:409](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L409) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:475](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L475) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:617](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L617) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:763](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L763) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:819](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L819) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:820](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L820) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:821](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L821) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:891](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L891) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:957](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L957) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:1101](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L1101) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:1170](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L1170) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:1220](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L1220) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:1221](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L1221) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:1222](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L1222) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:1374](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L1374) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:1632](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L1632) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:1686](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L1686) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:1687](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L1687) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:1688](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L1688) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:1756](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L1756) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:1822](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L1822) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:1944](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L1944) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:2071](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L2071) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:2198](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L2198) -- [apiSharingNgLinkSharePermission/createLinkShare.feature:2326](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature#L2326) -- [apiSharingNgLinkSharePermission/updateLinkShare.feature:73](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/updateLinkShare.feature#L73) -- [apiSharingNgLinkSharePermission/updateLinkShare.feature:75](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/updateLinkShare.feature#L75) -- [apiSharingNgLinkSharePermission/updateLinkShare.feature:76](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/updateLinkShare.feature#L76) -- [apiSharingNgLinkSharePermission/updateLinkShare.feature:77](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/updateLinkShare.feature#L77) -- [apiSharingNgLinkSharePermission/updateLinkShare.feature:143](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/updateLinkShare.feature#L143) -- [apiSharingNgLinkSharePermission/updateLinkShare.feature:405](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/updateLinkShare.feature#L405) -- [apiSharingNgLinkSharePermission/updateLinkShare.feature:792](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/updateLinkShare.feature#L792) -- [apiSharingNgLinkShareRoot/createLinkShare.feature:212](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShareRoot/createLinkShare.feature#L212) -- [apiSharingNgLinkShareRoot/createLinkShare.feature:352](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShareRoot/createLinkShare.feature#L352) -- [apiSharingNgLinkShareRoot/createLinkShare.feature:406](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShareRoot/createLinkShare.feature#L406) -- [apiSharingNgLinkShareRoot/createLinkShare.feature:407](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShareRoot/createLinkShare.feature#L407) -- [apiSharingNgLinkShareRoot/createLinkShare.feature:408](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShareRoot/createLinkShare.feature#L408) -- [apiSharingNgLinkShareRoot/createLinkShare.feature:476](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShareRoot/createLinkShare.feature#L476) -- [apiSharingNgLinkShareRoot/createLinkShare.feature:543](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShareRoot/createLinkShare.feature#L543) -- [apiSharingNgLinkShareRoot/createLinkShare.feature:614](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShareRoot/createLinkShare.feature#L614) -- [apiSharingNg2/removeAccessToDriveItemInLinkShare.feature:27](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg2/removeAccessToDriveItemInLinkShare.feature#L27) -- [apiSharingNg2/removeAccessToDriveItemInLinkShare.feature:43](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg2/removeAccessToDriveItemInLinkShare.feature#L43) -- [apiSharingNg2/removeAccessToDriveItemInLinkShare.feature:63](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg2/removeAccessToDriveItemInLinkShare.feature#L63) -- [apiSharingNg2/removeAccessToDriveItemInLinkShare.feature:81](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg2/removeAccessToDriveItemInLinkShare.feature#L81) -- [apiSharingNg1/removeAccessToDrive.feature:177](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg1/removeAccessToDrive.feature#L177) -- [apiSharingNg1/removeAccessToDrive.feature:206](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg1/removeAccessToDrive.feature#L206) -- [apiSharingNg1/removeAccessToDrive.feature:236](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg1/removeAccessToDrive.feature#L236) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:72](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L72) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:202](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L202) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:340](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L340) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:409](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L409) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:475](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L475) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:617](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L617) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:763](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L763) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:819](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L819) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:820](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L820) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:821](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L821) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:891](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L891) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:957](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L957) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:1101](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L1101) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:1170](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L1170) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:1220](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L1220) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:1221](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L1221) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:1222](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L1222) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:1374](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L1374) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:1632](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L1632) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:1686](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L1686) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:1687](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L1687) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:1688](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L1688) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:1756](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L1756) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:1822](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L1822) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:1944](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L1944) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:2071](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L2071) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:2198](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L2198) +- [apiSharingNgItemLinkShare/createItemLinkShare.feature:2326](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature#L2326) +- [apiSharingNgItemLinkShare/updateItemLinkShare.feature:73](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/updateItemLinkShare.feature#L73) +- [apiSharingNgItemLinkShare/updateItemLinkShare.feature:75](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/updateItemLinkShare.feature#L75) +- [apiSharingNgItemLinkShare/updateItemLinkShare.feature:76](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/updateItemLinkShare.feature#L76) +- [apiSharingNgItemLinkShare/updateItemLinkShare.feature:77](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/updateItemLinkShare.feature#L77) +- [apiSharingNgItemLinkShare/updateItemLinkShare.feature:143](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/updateItemLinkShare.feature#L143) +- [apiSharingNgItemLinkShare/updateItemLinkShare.feature:405](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/updateItemLinkShare.feature#L405) +- [apiSharingNgItemLinkShare/updateItemLinkShare.feature:792](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/updateItemLinkShare.feature#L792) +- [apiSharingNgDriveLinkShare/createDriveLinkShare.feature:212](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgDriveLinkShare/createDriveLinkShare.feature#L212) +- [apiSharingNgDriveLinkShare/createDriveLinkShare.feature:352](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgDriveLinkShare/createDriveLinkShare.feature#L352) +- [apiSharingNgDriveLinkShare/createDriveLinkShare.feature:406](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgDriveLinkShare/createDriveLinkShare.feature#L406) +- [apiSharingNgDriveLinkShare/createDriveLinkShare.feature:407](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgDriveLinkShare/createDriveLinkShare.feature#L407) +- [apiSharingNgDriveLinkShare/createDriveLinkShare.feature:408](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgDriveLinkShare/createDriveLinkShare.feature#L408) +- [apiSharingNgDriveLinkShare/createDriveLinkShare.feature:476](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgDriveLinkShare/createDriveLinkShare.feature#L476) +- [apiSharingNgDriveLinkShare/createDriveLinkShare.feature:543](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgDriveLinkShare/createDriveLinkShare.feature#L543) +- [apiSharingNgDriveLinkShare/createDriveLinkShare.feature:614](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgDriveLinkShare/createDriveLinkShare.feature#L614) +- [apiSharingNgItemLinkShare/deleteLinkShare.feature:27](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/deleteLinkShare.feature#L27) +- [apiSharingNgItemLinkShare/deleteLinkShare.feature:43](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/deleteLinkShare.feature#L43) +- [apiSharingNgItemLinkShare/deleteLinkShare.feature:63](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/deleteLinkShare.feature#L63) +- [apiSharingNgItemLinkShare/deleteLinkShare.feature:81](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgItemLinkShare/deleteLinkShare.feature#L81) +- [apiSharingNgDriveInvitation/removeAccessToDrive.feature:177](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgDriveInvitation/removeAccessToDrive.feature#L177) +- [apiSharingNgDriveInvitation/removeAccessToDrive.feature:206](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgDriveInvitation/removeAccessToDrive.feature#L206) +- [apiSharingNgDriveInvitation/removeAccessToDrive.feature:236](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgDriveInvitation/removeAccessToDrive.feature#L236) #### [sharee (editor role) MOVE a file by file-id into shared sub-folder returns 502](https://github.com/owncloud/ocis/issues/7617) diff --git a/tests/acceptance/expected-failures-without-remotephp.md b/tests/acceptance/expected-failures-without-remotephp.md index 5bef0809030..08f30c5194b 100644 --- a/tests/acceptance/expected-failures-without-remotephp.md +++ b/tests/acceptance/expected-failures-without-remotephp.md @@ -134,20 +134,20 @@ #### [Downloading public files without remote.php returns 401 unauthorized error](https://github.com/owncloud/ocis/issues/9724) -- [apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature:79](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature#L79) -- [apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature:80](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature#L80) -- [apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature:107](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature#L107) -- [apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature:108](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature#L108) -- [apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature:171](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature#L171) -- [apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature:172](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature#L172) -- [apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature:229](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature#L229) -- [apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature:230](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature#L230) -- [apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature:231](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature#L231) -- [apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature:232](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature#L232) -- [apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature:233](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature#L233) -- [apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature:234](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature#L234) -- [apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature:235](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature#L235) -- [apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature:236](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature#L236) +- [coreApiSharePublicLink2/enforcePasswordPublicLink.feature:79](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature#L79) +- [coreApiSharePublicLink2/enforcePasswordPublicLink.feature:80](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature#L80) +- [coreApiSharePublicLink2/enforcePasswordPublicLink.feature:107](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature#L107) +- [coreApiSharePublicLink2/enforcePasswordPublicLink.feature:108](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature#L108) +- [coreApiSharePublicLink2/enforcePasswordPublicLink.feature:171](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature#L171) +- [coreApiSharePublicLink2/enforcePasswordPublicLink.feature:172](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature#L172) +- [coreApiSharePublicLink2/enforcePasswordPublicLink.feature:229](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature#L229) +- [coreApiSharePublicLink2/enforcePasswordPublicLink.feature:230](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature#L230) +- [coreApiSharePublicLink2/enforcePasswordPublicLink.feature:231](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature#L231) +- [coreApiSharePublicLink2/enforcePasswordPublicLink.feature:232](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature#L232) +- [coreApiSharePublicLink2/enforcePasswordPublicLink.feature:233](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature#L233) +- [coreApiSharePublicLink2/enforcePasswordPublicLink.feature:234](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature#L234) +- [coreApiSharePublicLink2/enforcePasswordPublicLink.feature:235](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature#L235) +- [coreApiSharePublicLink2/enforcePasswordPublicLink.feature:236](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature#L236) - [apiSpaces/editPublicLinkOfSpace.feature:52](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/editPublicLinkOfSpace.feature#L52) - [apiSpaces/editPublicLinkOfSpace.feature:53](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/editPublicLinkOfSpace.feature#L53) - [apiSpacesShares/publicLinkDownload.feature:16](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/publicLinkDownload.feature#L16) diff --git a/tests/acceptance/features/apiSharingNg1/propfindShares.feature b/tests/acceptance/features/apiContract/propfindShares.feature similarity index 100% rename from tests/acceptance/features/apiSharingNg1/propfindShares.feature rename to tests/acceptance/features/apiContract/propfindShares.feature diff --git a/tests/acceptance/features/apiOptionalShareRole/editorWithVersions.feature b/tests/acceptance/features/apiSharingNgAdditionalShareRole/editorWithVersions.feature similarity index 100% rename from tests/acceptance/features/apiOptionalShareRole/editorWithVersions.feature rename to tests/acceptance/features/apiSharingNgAdditionalShareRole/editorWithVersions.feature diff --git a/tests/acceptance/features/apiSharingNgDriveInvitation/driveShareInvitations.feature b/tests/acceptance/features/apiSharingNgDriveInvitation/driveShareInvitations.feature new file mode 100644 index 00000000000..83f2bad4cb3 --- /dev/null +++ b/tests/acceptance/features/apiSharingNgDriveInvitation/driveShareInvitations.feature @@ -0,0 +1,1408 @@ +@issue-10739 +Feature: Send a drive invitations + As the owner of a resource + I want to be able to send drive invitations to other users + So that they can have access to it + + https://owncloud.dev/libre-graph-api/#/drives.permissions/Invite + + Background: + Given these users have been created with default attributes: + | username | + | Alice | + | Brian | + + + Scenario Outline: send share invitation for project space to user with different roles (permissions endpoint) + 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 "NewSpace" with the default quota using the Graph API + When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: + | space | NewSpace | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + 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": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } + } + } + } + } + } + } + """ + Examples: + | permissions-role | + | Space Viewer | + | Space Editor | + | Manager | + + + Scenario Outline: send share invitation for disabled project space to user with different roles (permissions endpoint) + 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 "NewSpace" with the default quota using the Graph API + And user "Admin" has disabled a space "NewSpace" + When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: + | space | NewSpace | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + Then the HTTP status code should be "404" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "const": "itemNotFound" + }, + "message": { + "type": "string", + "pattern": "^stat: error: not found: %user_id_pattern%$" + } + } + } + } + } + """ + Examples: + | permissions-role | + | Space Viewer | + | Space Editor | + | Manager | + + + Scenario Outline: send share invitation for deleted project space to user with different roles (permissions endpoint) + 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 "NewSpace" with the default quota using the Graph API + And user "Admin" has disabled a space "NewSpace" + And user "Admin" has deleted a space "NewSpace" + When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: + | space | NewSpace | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + Then the HTTP status code should be "404" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "const": "itemNotFound" + }, + "message": { + "const": "stat: error: not found: " + } + } + } + } + } + """ + Examples: + | permissions-role | + | Space Viewer | + | Space Editor | + | Manager | + + + Scenario Outline: send share invitation for project space to group with different roles (permissions endpoint) + Given using spaces DAV path + And user "Carol" has been created with default attributes + And group "grp1" has been created + And the following users have been added to the following groups + | username | groupname | + | Brian | grp1 | + | Carol | grp1 | + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "NewSpace" with the default quota using the Graph API + When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: + | space | NewSpace | + | sharee | grp1 | + | shareType | group | + | permissionsRole | | + 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": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "roles", + "id" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "group" + ], + "properties": { + "group": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "grp1" + }, + "id": { + "type": "string", + "pattern": "^%group_id_pattern%$" + } + } + } + } + }, + "id": { + "type": "string", + "pattern": "^g:%group_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } + } + } + } + } + } + } + """ + Examples: + | permissions-role | + | Space Viewer | + | Space Editor | + | Manager | + + + Scenario Outline: send share invitation for disabled project space to group with different roles (permissions endpoint) + Given using spaces DAV path + And user "Carol" has been created with default attributes + And group "grp1" has been created + And the following users have been added to the following groups + | username | groupname | + | Brian | grp1 | + | Carol | grp1 | + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "NewSpace" with the default quota using the Graph API + And user "Admin" has disabled a space "NewSpace" + When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: + | space | NewSpace | + | sharee | grp1 | + | shareType | group | + | permissionsRole | | + Then the HTTP status code should be "404" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "const": "itemNotFound" + }, + "message": { + "type": "string", + "pattern": "^stat: error: not found: %user_id_pattern%$" + } + } + } + } + } + """ + Examples: + | permissions-role | + | Space Viewer | + | Space Editor | + | Manager | + + + Scenario Outline: send share invitation for deleted project space to group with different roles (permissions endpoint) + Given using spaces DAV path + And user "Carol" has been created with default attributes + And group "grp1" has been created + And the following users have been added to the following groups + | username | groupname | + | Brian | grp1 | + | Carol | grp1 | + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "NewSpace" with the default quota using the Graph API + And user "Admin" has disabled a space "NewSpace" + And user "Admin" has deleted a space "NewSpace" + When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: + | space | NewSpace | + | sharee | grp1 | + | shareType | group | + | permissionsRole | | + Then the HTTP status code should be "404" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "const": "itemNotFound" + }, + "message": { + "const": "stat: error: not found: " + } + } + } + } + } + """ + Examples: + | permissions-role | + | Space Viewer | + | Space Editor | + | Manager | + + + Scenario: send share invitation to user for deleted file + Given user "Alice" has uploaded file with content "to share" to "textfile1.txt" + And we save it into "FILEID" + And user "Alice" has deleted file "textfile1.txt" + When user "Alice" sends the following share invitation with file-id "<>" using the Graph API: + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + Then the HTTP status code should be "404" + And user "Brian" should not have a share "textfile1.txt" shared by user "Alice" from space "Personal" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "const": "itemNotFound" + }, + "message": { + "const": "stat: error: not found: " + } + } + } + } + } + """ + + + Scenario: send share invitation to group for deleted file + Given user "Carol" has been created with default attributes + And group "grp1" has been created + And the following users have been added to the following groups + | username | groupname | + | Brian | grp1 | + | Carol | grp1 | + And user "Alice" has uploaded file with content "to share" to "textfile1.txt" + And we save it into "FILEID" + And user "Alice" has deleted file "textfile1.txt" + When user "Alice" sends the following share invitation with file-id "<>" using the Graph API: + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | + Then the HTTP status code should be "404" + And user "Brian" should not have a share "textfile1.txt" shared by user "Alice" from space "Personal" + And user "Carol" should not have a share "textfile1.txt" shared by user "Alice" from space "Personal" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "const": "itemNotFound" + }, + "message": { + "const": "stat: error: not found: " + } + } + } + } + } + """ + + @issue-8494 + Scenario Outline: try to send share invitation for personal space to user with different roles (permissions endpoint) + When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "innererror", + "message" + ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ + "date", + "request-id" + ] + }, + "message": { + "const": "space type is not eligible for sharing" + } + } + } + } + } + """ + Examples: + | permissions-role | + | Space Viewer | + | Space Editor | + | Manager | + + @issue-8495 + Scenario Outline: try to share Shares space with a user (permissions endpoint) + When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: + | space | Shares | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "innererror", + "message" + ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ + "date", + "request-id" + ] + }, + "message": { + "const": "" + } + } + } + } + } + """ + Examples: + | permissions-role | error-message | + | Space Viewer | role not applicable to this resource | + | Space Editor | role not applicable to this resource | + | Manager | role not applicable to this resource | + + + Scenario Outline: invite user to a project space with different roles using root endpoint + 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 "NewSpace" with the default quota using the Graph API + When user "Alice" sends the following space share invitation using root endpoint of the Graph API: + | space | NewSpace | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + 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": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } + } + } + } + } + } + } + """ + Examples: + | permissions-role | + | Space Viewer | + | Space Editor | + | Manager | + + + Scenario Outline: invite group to project space with different roles using root endpoint + 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 "NewSpace" with the default quota using the Graph API + When user "Alice" sends the following space share invitation using root endpoint of the Graph API: + | space | NewSpace | + | sharee | grp1 | + | shareType | group | + | permissionsRole | | + 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": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "group" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "const": "grp1" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } + } + } + } + } + } + } + """ + Examples: + | permissions-role | + | Space Viewer | + | Space Editor | + | Manager | + + + Scenario Outline: try to invite multiple users to project space with different roles using root endpoint + Given using spaces DAV path + And user "Carol" has been created with default attributes + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "NewSpace" with the default quota using the Graph API + When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: + | space | NewSpace | + | sharee | Brian, Carol | + | shareType | user, user | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "innererror", + "message" + ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ + "date", + "request-id" + ] + }, + "message": { + "const": "Key: 'DriveItemInvite.Recipients' Error:Field validation for 'Recipients' failed on the 'len' tag" + } + } + } + } + } + """ + Examples: + | permissions-role | + | Space Viewer | + | Space Editor | + | Manager | + + + Scenario Outline: try to invite one existing user and one non-existing user at once to project space with different roles using root endpoint + 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 "NewSpace" with the default quota using the Graph API + When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: + | space | NewSpace | + | sharee | Brian, non-existent | + | shareType | user, user | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "innererror", + "message" + ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ + "date", + "request-id" + ] + }, + "message": { + "const": "Key: 'DriveItemInvite.Recipients' Error:Field validation for 'Recipients' failed on the 'len' tag" + } + } + } + } + } + """ + Examples: + | permissions-role | + | Space Viewer | + | Space Editor | + | Manager | + + + Scenario Outline: try to invite multiple groups at once to project space with different roles using root endpoint + Given using spaces DAV path + And user "Carol" has been created with default attributes + And group "grp1" has been created + And group "grp2" has been created + And the following users have been added to the following groups + | username | groupname | + | Brian | grp1 | + | Carol | grp2 | + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "NewSpace" with the default quota using the Graph API + When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: + | space | NewSpace | + | sharee | grp1, grp2 | + | shareType | group, group | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "innererror", + "message" + ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ + "date", + "request-id" + ] + }, + "message": { + "const": "Key: 'DriveItemInvite.Recipients' Error:Field validation for 'Recipients' failed on the 'len' tag" + } + } + } + } + } + """ + Examples: + | permissions-role | + | Space Viewer | + | Space Editor | + | Manager | + + + Scenario Outline: try to invite one existing group and one non-existing group to project space with different roles using root endpoint + 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 "NewSpace" with the default quota using the Graph API + When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: + | space | NewSpace | + | sharee | grp1, grp2 | + | shareType | group, group | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "innererror", + "message" + ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ + "date", + "request-id" + ] + }, + "message": { + "const": "Key: 'DriveItemInvite.Recipients' Error:Field validation for 'Recipients' failed on the 'len' tag" + } + } + } + } + } + """ + Examples: + | permissions-role | + | Space Viewer | + | Space Editor | + | Manager | + + + Scenario Outline: try to invite user and group at once to project space with different roles using root endpoint + Given using spaces DAV path + And user "Carol" has been created with default attributes + 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 "NewSpace" with the default quota using the Graph API + When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: + | space | NewSpace | + | sharee | Carol, grp2 | + | shareType | user, group | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "innererror", + "message" + ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ + "date", + "request-id" + ] + }, + "message": { + "const": "Key: 'DriveItemInvite.Recipients' Error:Field validation for 'Recipients' failed on the 'len' tag" + } + } + } + } + } + """ + Examples: + | permissions-role | + | Space Viewer | + | Space Editor | + | Manager | + + + Scenario Outline: try to invite user to personal drive with different roles using root endpoint + When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "innererror", + "message" + ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ + "date", + "request-id" + ] + }, + "message": { + "const": "unsupported space type" + } + } + } + } + } + """ + Examples: + | permissions-role | + | Viewer | + | File Editor | + | Viewer | + | Editor | + | Uploader | + + + Scenario Outline: try to invite group to personal drive with different roles using root endpoint + Given group "grp1" has been created + And the following users have been added to the following groups + | username | groupname | + | Brian | grp1 | + When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "innererror", + "message" + ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ + "date", + "request-id" + ] + }, + "message": { + "const": "unsupported space type" + } + } + } + } + } + """ + Examples: + | permissions-role | + | Viewer | + | File Editor | + | Viewer | + | Editor | + | Uploader | + + + Scenario Outline: try to invite user to shares drive with different re-sharing permissions using root endpoint + When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: + | space | Shares | + | sharee | Brian | + | shareType | user | + | permissionsAction | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "innererror", + "message" + ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ + "date", + "request-id" + ] + }, + "message": { + "const": "unsupported space type" + } + } + } + } + } + """ + Examples: + | permissions-action | + | permissions/create | + | permissions/update | + | permissions/delete | + | permissions/deny | + + + Scenario Outline: try to invite group to shares drive with different re-sharing permissions using root endpoint + Given group "grp1" has been created + And the following users have been added to the following groups + | username | groupname | + | Brian | grp1 | + When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: + | space | Shares | + | sharee | grp1 | + | shareType | group | + | permissionsAction | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "innererror", + "message" + ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ + "date", + "request-id" + ] + }, + "message": { + "const": "unsupported space type" + } + } + } + } + } + """ + Examples: + | permissions-action | + | permissions/create | + | permissions/update | + | permissions/delete | + | permissions/deny | + + + Scenario Outline: try to send a sharing invitation for the personal drive to an non-existent sharee using root endpoint + When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: + | space | Personal | + | sharee | non-existent | + | shareType | | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "innererror", + "message" + ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ + "date", + "request-id" + ] + }, + "message": { + "const": "unsupported space type" + } + } + } + } + } + """ + Examples: + | permissions-role | sharee-type | + | Viewer | user | + | File Editor | user | + | Viewer | user | + | Editor | user | + | Uploader | user | + | Viewer | group | + | File Editor | group | + | Viewer | group | + | Editor | group | + | Uploader | group | + + + Scenario Outline: try to send a sharing invitation for the personal drive with an empty sharee using root endpoint + When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: + | space | Personal | + | sharee | | + | shareType | | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "innererror", + "message" + ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ + "date", + "request-id" + ] + }, + "message": { + "const": "Key: 'DriveItemInvite.Recipients[0].ObjectId' Error:Field validation for 'ObjectId' failed on the 'ne' tag" + } + } + } + } + } + """ + Examples: + | permissions-role | sharee-type | + | Viewer | user | + | File Editor | user | + | Viewer | user | + | Editor | user | + | Uploader | user | + | Viewer | group | + | File Editor | group | + | Viewer | group | + | Editor | group | + | Uploader | group | + + + Scenario Outline: try to send a sharing invitation for the project drive to an non-existent sharee using root endpoint + 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 "NewSpace" with the default quota using the Graph API + When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: + | space | NewSpace | + | sharee | non-existent | + | shareType | | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "innererror", + "message" + ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ + "date", + "request-id" + ] + }, + "message": { + "const": "itemNotFound: not found" + } + } + } + } + } + """ + Examples: + | permissions-role | sharee-type | + | Space Viewer | user | + | Space Editor | user | + | Manager | user | + | Space Viewer | group | + | Space Editor | group | + | Manager | group | + + + Scenario Outline: try to send a sharing invitation for the project drive with empty sharee using root endpoint + 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 "NewSpace" with the default quota using the Graph API + When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: + | space | NewSpace | + | sharee | | + | shareType | | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "innererror", + "message" + ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ + "date", + "request-id" + ] + }, + "message": { + "const": "Key: 'DriveItemInvite.Recipients[0].ObjectId' Error:Field validation for 'ObjectId' failed on the 'ne' tag" + } + } + } + } + } + """ + Examples: + | permissions-role | sharee-type | + | Space Viewer | user | + | Space Editor | user | + | Manager | user | + | Space Viewer | group | + | Space Editor | group | + | Manager | group | + + @env-config + Scenario Outline: try to invite to the project space after disabling the role + Given the administrator has disabled the permissions role "" + And 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 "new-space" with the default quota using the Graph API + When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: + | space | new-space | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": ["code", "innererror", "message"], + "properties": { + "code": { "const": "invalidRequest" }, + "innererror": { + "type": "object", + "required": ["date", "request-id"] + }, + "message": { "const": "Key: 'DriveItemInvite.Roles' Error:Field validation for 'Roles' failed on the 'available_role' tag" } + } + } + } + } + """ + Examples: + | permissions-role | + | Space Viewer | + | Space Editor | + | Manager | diff --git a/tests/acceptance/features/apiSharingNg1/removeAccessToDrive.feature b/tests/acceptance/features/apiSharingNgDriveInvitation/removeAccessToDrive.feature similarity index 100% rename from tests/acceptance/features/apiSharingNg1/removeAccessToDrive.feature rename to tests/acceptance/features/apiSharingNgDriveInvitation/removeAccessToDrive.feature diff --git a/tests/acceptance/features/apiSharingNgShareInvitation/updateShareInvitations.feature b/tests/acceptance/features/apiSharingNgDriveInvitation/updateDriveShareInvitations.feature similarity index 67% rename from tests/acceptance/features/apiSharingNgShareInvitation/updateShareInvitations.feature rename to tests/acceptance/features/apiSharingNgDriveInvitation/updateDriveShareInvitations.feature index ff41e28f1fd..3999d21902d 100644 --- a/tests/acceptance/features/apiSharingNgShareInvitation/updateShareInvitations.feature +++ b/tests/acceptance/features/apiSharingNgDriveInvitation/updateDriveShareInvitations.feature @@ -1,6 +1,6 @@ Feature: Update permission of a share As a user - I want to update resources shared with me + I want to update drive invitations So that I can have more control over my shares and manage it https://owncloud.dev/libre-graph-api/#/drives.permissions/UpdatePermission @@ -11,224 +11,6 @@ Feature: Update permission of a share | Brian | - Scenario: user updates expiration date of a share - Given user "Alice" has uploaded file with content "hello world" to "testfile.txt" - And user "Alice" has sent the following resource share invitation: - | resource | testfile.txt | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | - | expirationDateTime | 2025-07-15T14:00:00Z | - When user "Alice" updates the last resource share with the following properties using the Graph API: - | space | Personal | - | resource | testfile.txt | - | expirationDateTime | 2200-07-15T14:00:00Z | - Then the HTTP status code should be "200" - And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "expirationDateTime", - "grantedToV2", - "id", - "roles" - ], - "properties": { - "expirationDateTime": { - "type": "string", - "enum": ["2200-07-15T14:00:00Z"] - }, - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "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%$" - } - } - } - } - """ - - - 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 resource share invitation: - | resource | | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | - | expirationDateTime | 2025-07-15T14:00:00Z | - When user "Alice" updates the last resource share with the following properties 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", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "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: - | resource | - | 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" - And user "Alice" has sent the following resource share invitation: - | resource | | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - When user "Alice" updates the last resource share with the following properties using the Graph API: - | permissionsRole | | - | space | Personal | - | resource | | - Then the HTTP status code should be "200" - And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "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: - | permissions-role | resource | new-permissions-role | - | Viewer | textfile1.txt | File Editor | - | File Editor | textfile1.txt | Viewer | - | Viewer | FolderToShare | Uploader | - | Viewer | FolderToShare | Editor | - | Editor | FolderToShare | Viewer | - | Editor | FolderToShare | Uploader | - | Uploader | FolderToShare | Editor | - | Uploader | FolderToShare | Viewer | - - Scenario Outline: space admin updates role of a member in project space (permissions endpoint) Given using spaces DAV path And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API @@ -301,85 +83,6 @@ Feature: Update permission of a share | Manager | Space Editor | | Manager | Space Viewer | - - Scenario Outline: user updates role of a shared resource of 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 "NewSpace" with the default quota using the Graph API - And user "Alice" has uploaded a file inside space "NewSpace" with content "share space items" to "textfile1.txt" - And user "Alice" has created a folder "FolderToShare" in space "NewSpace" - And user "Alice" has sent the following resource share invitation: - | resource | | - | space | NewSpace | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - When user "Alice" updates the last resource share with the following properties using the Graph API: - | permissionsRole | | - | space | NewSpace | - | resource | | - Then the HTTP status code should be "200" - And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "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: - | permissions-role | new-permissions-role | resource | - | Viewer | File Editor | textfile1.txt | - | File Editor | Viewer | textfile1.txt | - | Viewer | Editor | FolderToShare | - | Viewer | Uploader | FolderToShare | - | Editor | Viewer | FolderToShare | - | Editor | Uploader | FolderToShare | - | Uploader | Viewer | FolderToShare | - | Uploader | Editor | FolderToShare | - @issue-8905 Scenario Outline: update role of a shared project space to group with different roles using root endpoint Given using spaces DAV path @@ -1182,177 +885,6 @@ Feature: Update permission of a share | Manager | Space Viewer | | Manager | Space Editor | - @issue-10768 - Scenario Outline: sharer updates share permissions role of a resource to Secure Viewer without enabling it - Given user "Alice" has created folder "folderToShare" - And user "Alice" has uploaded file with content "hello world" to "textfile.txt" - And user "Alice" has sent the following resource share invitation: - | resource | | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - When user "Alice" updates the last resource share with the following properties using the Graph API: - | permissionsRole | Secure Viewer | - | space | Personal | - | resource | | - Then the HTTP status code should be "200" - And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "@libre.graph.permissions.actions", - "grantedToV2", - "id", - "invitation" - ], - "properties": { - "@libre.graph.permissions.actions": { - "const": [ - "libre.graph/driveItem/path/read", - "libre.graph/driveItem/children/read", - "libre.graph/driveItem/basic/read" - ] - }, - "grantedToV2": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "id": { - "pattern": "^%permissions_id_pattern%$" - }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "invitedBy": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "pattern": "^%user_id_pattern%$" - } - } - } - } - } - } - } - } - } - """ - Examples: - | resource | permissions-role | - | folderToShare | Uploader | - | folderToShare | Editor | - | folderToShare | Viewer | - | textfile.txt | File Editor | - | textfile.txt | Viewer | - - @issue-10768 - Scenario Outline: sharer updates share permissions role of a resource to Denied without enabling it - Given user "Alice" has created folder "folderToShare" - And user "Alice" has sent the following resource share invitation: - | resource | folderToShare | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - When user "Alice" updates the last resource share with the following properties using the Graph API: - | permissionsRole | Denied | - | space | Personal | - | resource | folderToShare | - Then the HTTP status code should be "200" - And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "@libre.graph.permissions.actions", - "grantedToV2", - "id", - "invitation" - ], - "properties": { - "@libre.graph.permissions.actions": { - "const": ["none"] - }, - "grantedToV2": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "id": { - "pattern": "^%permissions_id_pattern%$" - }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "invitedBy": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "pattern": "^%user_id_pattern%$" - } - } - } - } - } - } - } - } - } - """ - Examples: - | permissions-role | - | Uploader | - | Editor | - | Viewer | - @issue-10768 Scenario Outline: sharer updates share permissions role of space to Space Editor Without Versions without enabling it Given using spaces DAV path diff --git a/tests/acceptance/features/apiSharingNgLinkShareRoot/createLinkShare.feature b/tests/acceptance/features/apiSharingNgDriveLinkShare/createDriveLinkShare.feature similarity index 100% rename from tests/acceptance/features/apiSharingNgLinkShareRoot/createLinkShare.feature rename to tests/acceptance/features/apiSharingNgDriveLinkShare/createDriveLinkShare.feature diff --git a/tests/acceptance/features/apiSharingNgLinkShareRoot/updateLinkShare.feature b/tests/acceptance/features/apiSharingNgDriveLinkShare/updateDriveLinkShare.feature similarity index 100% rename from tests/acceptance/features/apiSharingNgLinkShareRoot/updateLinkShare.feature rename to tests/acceptance/features/apiSharingNgDriveLinkShare/updateDriveLinkShare.feature diff --git a/tests/acceptance/features/apiSharingNgShareInvitation/shareInvitations.feature b/tests/acceptance/features/apiSharingNgItemInvitation/itemShareInvitations.feature similarity index 59% rename from tests/acceptance/features/apiSharingNgShareInvitation/shareInvitations.feature rename to tests/acceptance/features/apiSharingNgItemInvitation/itemShareInvitations.feature index 6309f7045e0..4be269b51be 100644 --- a/tests/acceptance/features/apiSharingNgShareInvitation/shareInvitations.feature +++ b/tests/acceptance/features/apiSharingNgItemInvitation/itemShareInvitations.feature @@ -1550,444 +1550,6 @@ Feature: Send a sharing invitations | FolderToShare | - Scenario Outline: send share invitation for project space to user with different roles (permissions endpoint) - 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 "NewSpace" with the default quota using the Graph API - When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: - | space | NewSpace | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - 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": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "grantedToV2", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - } - } - } - } - } - } - """ - Examples: - | permissions-role | - | Space Viewer | - | Space Editor | - | Manager | - - - Scenario Outline: send share invitation for disabled project space to user with different roles (permissions endpoint) - 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 "NewSpace" with the default quota using the Graph API - And user "Admin" has disabled a space "NewSpace" - When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: - | space | NewSpace | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - Then the HTTP status code should be "404" - And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "const": "itemNotFound" - }, - "message": { - "type": "string", - "pattern": "^stat: error: not found: %user_id_pattern%$" - } - } - } - } - } - """ - Examples: - | permissions-role | - | Space Viewer | - | Space Editor | - | Manager | - - - Scenario Outline: send share invitation for deleted project space to user with different roles (permissions endpoint) - 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 "NewSpace" with the default quota using the Graph API - And user "Admin" has disabled a space "NewSpace" - And user "Admin" has deleted a space "NewSpace" - When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: - | space | NewSpace | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - Then the HTTP status code should be "404" - And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "const": "itemNotFound" - }, - "message": { - "const": "stat: error: not found: " - } - } - } - } - } - """ - Examples: - | permissions-role | - | Space Viewer | - | Space Editor | - | Manager | - - - Scenario Outline: send share invitation for project space to group with different roles (permissions endpoint) - Given using spaces DAV path - And user "Carol" has been created with default attributes - And group "grp1" has been created - And the following users have been added to the following groups - | username | groupname | - | Brian | grp1 | - | Carol | grp1 | - And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API - And user "Alice" has created a space "NewSpace" with the default quota using the Graph API - When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: - | space | NewSpace | - | sharee | grp1 | - | shareType | group | - | permissionsRole | | - 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": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "grantedToV2", - "roles", - "id" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "group" - ], - "properties": { - "group": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "grp1" - }, - "id": { - "type": "string", - "pattern": "^%group_id_pattern%$" - } - } - } - } - }, - "id": { - "type": "string", - "pattern": "^g:%group_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - } - } - } - } - } - } - """ - Examples: - | permissions-role | - | Space Viewer | - | Space Editor | - | Manager | - - - Scenario Outline: send share invitation for disabled project space to group with different roles (permissions endpoint) - Given using spaces DAV path - And user "Carol" has been created with default attributes - And group "grp1" has been created - And the following users have been added to the following groups - | username | groupname | - | Brian | grp1 | - | Carol | grp1 | - And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API - And user "Alice" has created a space "NewSpace" with the default quota using the Graph API - And user "Admin" has disabled a space "NewSpace" - When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: - | space | NewSpace | - | sharee | grp1 | - | shareType | group | - | permissionsRole | | - Then the HTTP status code should be "404" - And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "const": "itemNotFound" - }, - "message": { - "type": "string", - "pattern": "^stat: error: not found: %user_id_pattern%$" - } - } - } - } - } - """ - Examples: - | permissions-role | - | Space Viewer | - | Space Editor | - | Manager | - - - Scenario Outline: send share invitation for deleted project space to group with different roles (permissions endpoint) - Given using spaces DAV path - And user "Carol" has been created with default attributes - And group "grp1" has been created - And the following users have been added to the following groups - | username | groupname | - | Brian | grp1 | - | Carol | grp1 | - And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API - And user "Alice" has created a space "NewSpace" with the default quota using the Graph API - And user "Admin" has disabled a space "NewSpace" - And user "Admin" has deleted a space "NewSpace" - When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: - | space | NewSpace | - | sharee | grp1 | - | shareType | group | - | permissionsRole | | - Then the HTTP status code should be "404" - And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "const": "itemNotFound" - }, - "message": { - "const": "stat: error: not found: " - } - } - } - } - } - """ - Examples: - | permissions-role | - | Space Viewer | - | Space Editor | - | Manager | - - - Scenario: send share invitation to user for deleted file - Given user "Alice" has uploaded file with content "to share" to "textfile1.txt" - And we save it into "FILEID" - And user "Alice" has deleted file "textfile1.txt" - When user "Alice" sends the following share invitation with file-id "<>" using the Graph API: - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | - Then the HTTP status code should be "404" - And user "Brian" should not have a share "textfile1.txt" shared by user "Alice" from space "Personal" - And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "const": "itemNotFound" - }, - "message": { - "const": "stat: error: not found: " - } - } - } - } - } - """ - - - Scenario: send share invitation to group for deleted file - Given user "Carol" has been created with default attributes - And group "grp1" has been created - And the following users have been added to the following groups - | username | groupname | - | Brian | grp1 | - | Carol | grp1 | - And user "Alice" has uploaded file with content "to share" to "textfile1.txt" - And we save it into "FILEID" - And user "Alice" has deleted file "textfile1.txt" - When user "Alice" sends the following share invitation with file-id "<>" using the Graph API: - | space | Personal | - | sharee | grp1 | - | shareType | group | - | permissionsRole | Viewer | - Then the HTTP status code should be "404" - And user "Brian" should not have a share "textfile1.txt" shared by user "Alice" from space "Personal" - And user "Carol" should not have a share "textfile1.txt" shared by user "Alice" from space "Personal" - And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "const": "itemNotFound" - }, - "message": { - "const": "stat: error: not found: " - } - } - } - } - } - """ - - Scenario Outline: send share invitation for project space resource to user with different roles (permissions endpoint) Given using spaces DAV path And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API @@ -2163,98 +1725,6 @@ Feature: Send a sharing invitations | Editor | FolderToShare | | Uploader | FolderToShare | - @issue-8494 - Scenario Outline: try to send share invitation for personal space to user with different roles (permissions endpoint) - When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "innererror", - "message" - ], - "properties": { - "code": { - "const": "invalidRequest" - }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] - }, - "message": { - "const": "space type is not eligible for sharing" - } - } - } - } - } - """ - Examples: - | permissions-role | - | Space Viewer | - | Space Editor | - | Manager | - - @issue-8495 - Scenario Outline: try to share Shares space with a user (permissions endpoint) - When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: - | space | Shares | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "innererror", - "message" - ], - "properties": { - "code": { - "const": "invalidRequest" - }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] - }, - "message": { - "const": "" - } - } - } - } - } - """ - Examples: - | permissions-role | error-message | - | Space Viewer | role not applicable to this resource | - | Space Editor | role not applicable to this resource | - | Manager | role not applicable to this resource | - Scenario Outline: try to send share invitation with different re-sharing permissions Given group "grp1" has been created @@ -2285,832 +1755,6 @@ Feature: Send a sharing invitations | permissions/deny | - Scenario Outline: invite user to a project space with different roles using root endpoint - 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 "NewSpace" with the default quota using the Graph API - When user "Alice" sends the following space share invitation using root endpoint of the Graph API: - | space | NewSpace | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - 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": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "grantedToV2", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - } - } - } - } - } - } - """ - Examples: - | permissions-role | - | Space Viewer | - | Space Editor | - | Manager | - - - Scenario Outline: invite group to project space with different roles using root endpoint - 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 "NewSpace" with the default quota using the Graph API - When user "Alice" sends the following space share invitation using root endpoint of the Graph API: - | space | NewSpace | - | sharee | grp1 | - | shareType | group | - | permissionsRole | | - 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": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "grantedToV2", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "group" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "const": "grp1" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - } - } - } - } - } - } - """ - Examples: - | permissions-role | - | Space Viewer | - | Space Editor | - | Manager | - - - Scenario Outline: try to invite multiple users to project space with different roles using root endpoint - Given using spaces DAV path - And user "Carol" has been created with default attributes - And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API - And user "Alice" has created a space "NewSpace" with the default quota using the Graph API - When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: - | space | NewSpace | - | sharee | Brian, Carol | - | shareType | user, user | - | permissionsRole | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "innererror", - "message" - ], - "properties": { - "code": { - "const": "invalidRequest" - }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] - }, - "message": { - "const": "Key: 'DriveItemInvite.Recipients' Error:Field validation for 'Recipients' failed on the 'len' tag" - } - } - } - } - } - """ - Examples: - | permissions-role | - | Space Viewer | - | Space Editor | - | Manager | - - - Scenario Outline: try to invite one existing user and one non-existing user at once to project space with different roles using root endpoint - 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 "NewSpace" with the default quota using the Graph API - When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: - | space | NewSpace | - | sharee | Brian, non-existent | - | shareType | user, user | - | permissionsRole | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "innererror", - "message" - ], - "properties": { - "code": { - "const": "invalidRequest" - }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] - }, - "message": { - "const": "Key: 'DriveItemInvite.Recipients' Error:Field validation for 'Recipients' failed on the 'len' tag" - } - } - } - } - } - """ - Examples: - | permissions-role | - | Space Viewer | - | Space Editor | - | Manager | - - - Scenario Outline: try to invite multiple groups at once to project space with different roles using root endpoint - Given using spaces DAV path - And user "Carol" has been created with default attributes - And group "grp1" has been created - And group "grp2" has been created - And the following users have been added to the following groups - | username | groupname | - | Brian | grp1 | - | Carol | grp2 | - And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API - And user "Alice" has created a space "NewSpace" with the default quota using the Graph API - When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: - | space | NewSpace | - | sharee | grp1, grp2 | - | shareType | group, group | - | permissionsRole | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "innererror", - "message" - ], - "properties": { - "code": { - "const": "invalidRequest" - }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] - }, - "message": { - "const": "Key: 'DriveItemInvite.Recipients' Error:Field validation for 'Recipients' failed on the 'len' tag" - } - } - } - } - } - """ - Examples: - | permissions-role | - | Space Viewer | - | Space Editor | - | Manager | - - - Scenario Outline: try to invite one existing group and one non-existing group to project space with different roles using root endpoint - 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 "NewSpace" with the default quota using the Graph API - When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: - | space | NewSpace | - | sharee | grp1, grp2 | - | shareType | group, group | - | permissionsRole | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "innererror", - "message" - ], - "properties": { - "code": { - "const": "invalidRequest" - }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] - }, - "message": { - "const": "Key: 'DriveItemInvite.Recipients' Error:Field validation for 'Recipients' failed on the 'len' tag" - } - } - } - } - } - """ - Examples: - | permissions-role | - | Space Viewer | - | Space Editor | - | Manager | - - - Scenario Outline: try to invite user and group at once to project space with different roles using root endpoint - Given using spaces DAV path - And user "Carol" has been created with default attributes - 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 "NewSpace" with the default quota using the Graph API - When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: - | space | NewSpace | - | sharee | Carol, grp2 | - | shareType | user, group | - | permissionsRole | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "innererror", - "message" - ], - "properties": { - "code": { - "const": "invalidRequest" - }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] - }, - "message": { - "const": "Key: 'DriveItemInvite.Recipients' Error:Field validation for 'Recipients' failed on the 'len' tag" - } - } - } - } - } - """ - Examples: - | permissions-role | - | Space Viewer | - | Space Editor | - | Manager | - - - Scenario Outline: try to invite user to personal drive with different roles using root endpoint - When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "innererror", - "message" - ], - "properties": { - "code": { - "const": "invalidRequest" - }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] - }, - "message": { - "const": "unsupported space type" - } - } - } - } - } - """ - Examples: - | permissions-role | - | Viewer | - | File Editor | - | Viewer | - | Editor | - | Uploader | - - - Scenario Outline: try to invite group to personal drive with different roles using root endpoint - Given group "grp1" has been created - And the following users have been added to the following groups - | username | groupname | - | Brian | grp1 | - When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: - | space | Personal | - | sharee | grp1 | - | shareType | group | - | permissionsRole | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "innererror", - "message" - ], - "properties": { - "code": { - "const": "invalidRequest" - }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] - }, - "message": { - "const": "unsupported space type" - } - } - } - } - } - """ - Examples: - | permissions-role | - | Viewer | - | File Editor | - | Viewer | - | Editor | - | Uploader | - - - Scenario Outline: try to invite user to shares drive with different re-sharing permissions using root endpoint - When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: - | space | Shares | - | sharee | Brian | - | shareType | user | - | permissionsAction | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "innererror", - "message" - ], - "properties": { - "code": { - "const": "invalidRequest" - }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] - }, - "message": { - "const": "unsupported space type" - } - } - } - } - } - """ - Examples: - | permissions-action | - | permissions/create | - | permissions/update | - | permissions/delete | - | permissions/deny | - - - Scenario Outline: try to invite group to shares drive with different re-sharing permissions using root endpoint - Given group "grp1" has been created - And the following users have been added to the following groups - | username | groupname | - | Brian | grp1 | - When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: - | space | Shares | - | sharee | grp1 | - | shareType | group | - | permissionsAction | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "innererror", - "message" - ], - "properties": { - "code": { - "const": "invalidRequest" - }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] - }, - "message": { - "const": "unsupported space type" - } - } - } - } - } - """ - Examples: - | permissions-action | - | permissions/create | - | permissions/update | - | permissions/delete | - | permissions/deny | - - - Scenario Outline: try to send a sharing invitation for the personal drive to an non-existent sharee using root endpoint - When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: - | space | Personal | - | sharee | non-existent | - | shareType | | - | permissionsRole | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "innererror", - "message" - ], - "properties": { - "code": { - "const": "invalidRequest" - }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] - }, - "message": { - "const": "unsupported space type" - } - } - } - } - } - """ - Examples: - | permissions-role | sharee-type | - | Viewer | user | - | File Editor | user | - | Viewer | user | - | Editor | user | - | Uploader | user | - | Viewer | group | - | File Editor | group | - | Viewer | group | - | Editor | group | - | Uploader | group | - - - Scenario Outline: try to send a sharing invitation for the personal drive with an empty sharee using root endpoint - When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: - | space | Personal | - | sharee | | - | shareType | | - | permissionsRole | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "innererror", - "message" - ], - "properties": { - "code": { - "const": "invalidRequest" - }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] - }, - "message": { - "const": "Key: 'DriveItemInvite.Recipients[0].ObjectId' Error:Field validation for 'ObjectId' failed on the 'ne' tag" - } - } - } - } - } - """ - Examples: - | permissions-role | sharee-type | - | Viewer | user | - | File Editor | user | - | Viewer | user | - | Editor | user | - | Uploader | user | - | Viewer | group | - | File Editor | group | - | Viewer | group | - | Editor | group | - | Uploader | group | - - - Scenario Outline: try to send a sharing invitation for the project drive to an non-existent sharee using root endpoint - 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 "NewSpace" with the default quota using the Graph API - When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: - | space | NewSpace | - | sharee | non-existent | - | shareType | | - | permissionsRole | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "innererror", - "message" - ], - "properties": { - "code": { - "const": "invalidRequest" - }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] - }, - "message": { - "const": "itemNotFound: not found" - } - } - } - } - } - """ - Examples: - | permissions-role | sharee-type | - | Space Viewer | user | - | Space Editor | user | - | Manager | user | - | Space Viewer | group | - | Space Editor | group | - | Manager | group | - - - Scenario Outline: try to send a sharing invitation for the project drive with empty sharee using root endpoint - 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 "NewSpace" with the default quota using the Graph API - When user "Alice" tries to send the following space share invitation using root endpoint of the Graph API: - | space | NewSpace | - | sharee | | - | shareType | | - | permissionsRole | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": [ - "code", - "innererror", - "message" - ], - "properties": { - "code": { - "const": "invalidRequest" - }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] - }, - "message": { - "const": "Key: 'DriveItemInvite.Recipients[0].ObjectId' Error:Field validation for 'ObjectId' failed on the 'ne' tag" - } - } - } - } - } - """ - Examples: - | permissions-role | sharee-type | - | Space Viewer | user | - | Space Editor | user | - | Manager | user | - | Space Viewer | group | - | Space Editor | group | - | Manager | group | - - Scenario: share a file to user and group having same name (Personal space) Given user "Carol" has been created with default attributes And group "Brian" has been created @@ -3326,42 +1970,3 @@ Feature: Send a sharing invitations | folderToShare | Uploader | | textfile.txt | Viewer | | textfile.txt | File Editor | - - @env-config - Scenario Outline: try to invite to the project space after disabling the role - Given the administrator has disabled the permissions role "" - And 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 "new-space" with the default quota using the Graph API - When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API: - | space | new-space | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - Then the HTTP status code should be "400" - And the JSON data of the response should match - """ - { - "type": "object", - "required": ["error"], - "properties": { - "error": { - "type": "object", - "required": ["code", "innererror", "message"], - "properties": { - "code": { "const": "invalidRequest" }, - "innererror": { - "type": "object", - "required": ["date", "request-id"] - }, - "message": { "const": "Key: 'DriveItemInvite.Roles' Error:Field validation for 'Roles' failed on the 'available_role' tag" } - } - } - } - } - """ - Examples: - | permissions-role | - | Space Viewer | - | Space Editor | - | Manager | diff --git a/tests/acceptance/features/apiSharingNg1/removeAccessToDriveItem.feature b/tests/acceptance/features/apiSharingNgItemInvitation/removeAccessToDriveItem.feature similarity index 100% rename from tests/acceptance/features/apiSharingNg1/removeAccessToDriveItem.feature rename to tests/acceptance/features/apiSharingNgItemInvitation/removeAccessToDriveItem.feature diff --git a/tests/acceptance/features/apiSharingNgItemInvitation/updateItemShareInvitations.feature b/tests/acceptance/features/apiSharingNgItemInvitation/updateItemShareInvitations.feature new file mode 100644 index 00000000000..49b1fe01327 --- /dev/null +++ b/tests/acceptance/features/apiSharingNgItemInvitation/updateItemShareInvitations.feature @@ -0,0 +1,479 @@ +Feature: Update permission of a share + As a user + I want to update resources shared with me + So that I can have more control over my shares and manage it + https://owncloud.dev/libre-graph-api/#/drives.permissions/UpdatePermission + + Background: + Given these users have been created with default attributes: + | username | + | Alice | + | Brian | + + + Scenario: user updates expiration date of a share + Given user "Alice" has uploaded file with content "hello world" to "testfile.txt" + And user "Alice" has sent the following resource share invitation: + | resource | testfile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + | expirationDateTime | 2025-07-15T14:00:00Z | + When user "Alice" updates the last resource share with the following properties using the Graph API: + | space | Personal | + | resource | testfile.txt | + | expirationDateTime | 2200-07-15T14:00:00Z | + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "expirationDateTime", + "grantedToV2", + "id", + "roles" + ], + "properties": { + "expirationDateTime": { + "type": "string", + "enum": ["2200-07-15T14:00:00Z"] + }, + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "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%$" + } + } + } + } + """ + + + 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 resource share invitation: + | resource | | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + | expirationDateTime | 2025-07-15T14:00:00Z | + When user "Alice" updates the last resource share with the following properties 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", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "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: + | resource | + | 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" + And user "Alice" has sent the following resource share invitation: + | resource | | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + When user "Alice" updates the last resource share with the following properties using the Graph API: + | permissionsRole | | + | space | Personal | + | resource | | + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "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: + | permissions-role | resource | new-permissions-role | + | Viewer | textfile1.txt | File Editor | + | File Editor | textfile1.txt | Viewer | + | Viewer | FolderToShare | Uploader | + | Viewer | FolderToShare | Editor | + | Editor | FolderToShare | Viewer | + | Editor | FolderToShare | Uploader | + | Uploader | FolderToShare | Editor | + | Uploader | FolderToShare | Viewer | + + + Scenario Outline: user updates role of a shared resource of 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 "NewSpace" with the default quota using the Graph API + And user "Alice" has uploaded a file inside space "NewSpace" with content "share space items" to "textfile1.txt" + And user "Alice" has created a folder "FolderToShare" in space "NewSpace" + And user "Alice" has sent the following resource share invitation: + | resource | | + | space | NewSpace | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + When user "Alice" updates the last resource share with the following properties using the Graph API: + | permissionsRole | | + | space | NewSpace | + | resource | | + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "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: + | permissions-role | new-permissions-role | resource | + | Viewer | File Editor | textfile1.txt | + | File Editor | Viewer | textfile1.txt | + | Viewer | Editor | FolderToShare | + | Viewer | Uploader | FolderToShare | + | Editor | Viewer | FolderToShare | + | Editor | Uploader | FolderToShare | + | Uploader | Viewer | FolderToShare | + | Uploader | Editor | FolderToShare | + + @issue-10768 + Scenario Outline: sharer updates share permissions role of a resource to Secure Viewer without enabling it + Given user "Alice" has created folder "folderToShare" + And user "Alice" has uploaded file with content "hello world" to "textfile.txt" + And user "Alice" has sent the following resource share invitation: + | resource | | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + When user "Alice" updates the last resource share with the following properties using the Graph API: + | permissionsRole | Secure Viewer | + | space | Personal | + | resource | | + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "@libre.graph.permissions.actions", + "grantedToV2", + "id", + "invitation" + ], + "properties": { + "@libre.graph.permissions.actions": { + "const": [ + "libre.graph/driveItem/path/read", + "libre.graph/driveItem/children/read", + "libre.graph/driveItem/basic/read" + ] + }, + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "id": { + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "pattern": "^%user_id_pattern%$" + } + } + } + } + } + } + } + } + } + """ + Examples: + | resource | permissions-role | + | folderToShare | Uploader | + | folderToShare | Editor | + | folderToShare | Viewer | + | textfile.txt | File Editor | + | textfile.txt | Viewer | + + @issue-10768 + Scenario Outline: sharer updates share permissions role of a resource to Denied without enabling it + Given user "Alice" has created folder "folderToShare" + And user "Alice" has sent the following resource share invitation: + | resource | folderToShare | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + When user "Alice" updates the last resource share with the following properties using the Graph API: + | permissionsRole | Denied | + | space | Personal | + | resource | folderToShare | + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "@libre.graph.permissions.actions", + "grantedToV2", + "id", + "invitation" + ], + "properties": { + "@libre.graph.permissions.actions": { + "const": ["none"] + }, + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "id": { + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "pattern": "^%user_id_pattern%$" + } + } + } + } + } + } + } + } + } + """ + Examples: + | permissions-role | + | Uploader | + | Editor | + | Viewer | diff --git a/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature b/tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature similarity index 100% rename from tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature rename to tests/acceptance/features/apiSharingNgItemLinkShare/createItemLinkShare.feature diff --git a/tests/acceptance/features/apiSharingNg2/removeAccessToDriveItemInLinkShare.feature b/tests/acceptance/features/apiSharingNgItemLinkShare/deleteLinkShare.feature similarity index 100% rename from tests/acceptance/features/apiSharingNg2/removeAccessToDriveItemInLinkShare.feature rename to tests/acceptance/features/apiSharingNgItemLinkShare/deleteLinkShare.feature diff --git a/tests/acceptance/features/apiSharingNgItemLinkShare/enforcePasswordPublicLink.feature b/tests/acceptance/features/apiSharingNgItemLinkShare/enforcePasswordPublicLink.feature new file mode 100644 index 00000000000..cb8cc024cae --- /dev/null +++ b/tests/acceptance/features/apiSharingNgItemLinkShare/enforcePasswordPublicLink.feature @@ -0,0 +1,350 @@ +@env-config +Feature: enforce password on shareNg public link + As a user + I want to enforce passwords on public links shared with upload, edit, or contribute permission + So that the password is required to access the contents of the link + + Password requirements. set by default: + | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | true | + | OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 8 | + | OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 1 | + | OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 1 | + | OCIS_PASSWORD_POLICY_MIN_DIGITS | 1 | + | OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 1 | + + + Scenario Outline: user should be able to create public link with permission view and internal without a password when enforce-password is enabled + Given the following configs have been set: + | config | value | + | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false | + | OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true | + And user "Alice" has been created with default attributes + And user "Alice" has created folder "folder" + When user "Alice" creates the following resource link share using the Graph API: + | resource | folder | + | space | Personal | + | permissionsRole | | + 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": {"const": false}, + "id": {"pattern": "^[a-zA-Z]{15}$"}, + "link": { + "type": "object", + "required": ["@libre.graph.displayName","@libre.graph.quickLink","preventsDownload","type","webUrl"], + "properties": { + "@libre.graph.displayName": {"const": ""}, + "@libre.graph.quickLink": {"const": false}, + "preventsDownload": {"const": false}, + "type": {"const": ""}, + "webUrl": {"pattern": "^%base_url%/s/[a-zA-Z]{15}$"} + } + } + } + } + """ + Examples: + | permissions-role | permissions-role-value | + | View | view | + | Internal | internal | + + + Scenario Outline: user shouldn't be able to create public link with permission edit, upload, file drop and secure viewer without a password when enforce-password is enabled + Given the following configs have been set: + | config | value | + | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false | + | OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true | + And user "Alice" has been created with default attributes + And user "Alice" has created folder "folder" + When user "Alice" creates the following resource link share using the Graph API: + | resource | folder | + | space | Personal | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": ["code","innererror","message"], + "properties": { + "code": {"const": "invalidRequest"}, + "innererror": { + "type": "object", + "required": ["date","request-id"] + }, + "message": {"const": "password protection is enforced"} + } + } + } + } + """ + Examples: + | permissions-role | + | Edit | + | Upload | + | File Drop | + + + Scenario Outline: user should allowed to updated public link to edit, upload file drop and secure viewer permission when enforce-password is enabled + Given the following configs have been set: + | config | value | + | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false | + | OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true | + And using spaces DAV path + And user "Alice" has been created with default attributes + And user "Alice" has created folder "folder" + And user "Alice" has uploaded file with content "test file" to "folder/testfile.txt" + And using SharingNG + And user "Alice" has created the following resource link share: + | resource | folder | + | space | Personal | + | permissionsRole | View | + | password | %public% | + And user "Alice" updates the last public link share using the permissions endpoint of the Graph API: + | resource | folder | + | space | Personal | + | permissionsRole | | + Then the HTTP status code should be "200" + And the public should not be able to download file "/testfile.txt" from inside the last public link shared folder using the public WebDAV API without a password + And the public should not be able to download file "/testfile.txt" from inside the last public link shared folder using the public WebDAV API with password "wrong pass" + But the public should be able to download file "/testfile.txt" from inside the last public link shared folder using the public WebDAV API with password "%public%" + Examples: + | new-permissions-role | + | Edit | + | Upload | + + + Scenario Outline: user shouldn't be allowed to updated public link without password to edit, upload file drop and secure viewer permission when enforce-password is enabled + Given the following configs have been set: + | config | value | + | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false | + | OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true | + And using spaces DAV path + And user "Alice" has been created with default attributes + And user "Alice" has created folder "folder" + And user "Alice" has uploaded file with content "test file" to "folder/testfile.txt" + And user "Alice" has created the following resource link share: + | resource | folder | + | space | Personal | + | permissionsRole | View | + And user "Alice" updates the last public link share using the permissions endpoint of the Graph API: + | resource | folder | + | space | Personal | + | permissionsRole | | + Then the HTTP status code should be "400" + Examples: + | new-permissions-role | + | Edit | + | Upload | + | File Drop | + + + Scenario Outline: user should be allowed to create a public link with a password in accordance with the password policy + Given the following configs have been set: + | config | value | + | OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true | + | OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 13 | + | OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 | + | OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 | + | OCIS_PASSWORD_POLICY_MIN_DIGITS | 2 | + | OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 | + And user "Alice" has been created with default attributes + And using SharingNG + And user "Alice" has created folder "folder" + And user "Alice" has uploaded file with content "test file" to "folder/testfile.txt" + When user "Alice" creates the following resource link share using the Graph API: + | resource | folder | + | space | Personal | + | permissionsRole | | + | password | 3s:5WW9uE5h=A | + Then the HTTP status code should be "200" + And the public should not be able to download file "/testfile.txt" from inside the last public link shared folder using the public WebDAV API without a password + And the public should not be able to download file "/testfile.txt" from inside the last public link shared folder using the public WebDAV API with password "wrong pass" + But the public should be able to download file "/testfile.txt" from inside the last public link shared folder using the public WebDAV API with password "3s:5WW9uE5h=A" + Examples: + | permissions-role | + | Edit | + | Upload | + + + Scenario Outline: user tries to create a public link with a password that does not comply with the password policy + Given the following configs have been set: + | config | value | + | OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 13 | + | OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 | + | OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 | + | OCIS_PASSWORD_POLICY_MIN_DIGITS | 2 | + | OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 | + And user "Alice" has been created with default attributes + And user "Alice" has uploaded file with content "test file" to "/testfile.txt" + And user "Alice" has created folder "folder" + And user "Alice" has uploaded file with content "test file" to "folder/testfile.txt" + When user "Alice" creates the following resource link share using the Graph API: + | resource | folder | + | space | Personal | + | permissionsRole | | + | password | Pas1 | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": ["code","innererror","message"], + "properties": { + "code": {"const": "invalidRequest"}, + "innererror": { + "type": "object", + "required": ["date","request-id"] + }, + "message": {"const": "at least 13 characters are required\nat least 3 lowercase letters are required\nat least 2 uppercase letters are required\nat least 2 numbers are required\nat least 2 special characters are required !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"} + } + } + } + } + """ + Examples: + | permissions-role | + | View | + | Edit | + | Upload | + | File Drop | + + + Scenario Outline: user update a public link with a password in accordance with the password policy + Given the following configs have been set: + | config | value | + | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false | + | OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true | + | OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 13 | + | OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 | + | OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 | + | OCIS_PASSWORD_POLICY_MIN_DIGITS | 1 | + | OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 | + And user "Alice" has been created with default attributes + And user "Alice" has created folder "folder" + And user "Alice" has uploaded file with content "test file" to "folder/testfile.txt" + And using SharingNG + And user "Alice" has created the following resource link share: + | resource | folder | + | space | Personal | + | permissionsRole | | + | password | 6a0Q;A3 +i^m[ | + When user "Alice" sets the following password for the last link share using the Graph API: + | resource | folder | + | space | Personal | + | password | 6afsa0Q;A3 +i^m[ | + Then the HTTP status code should be "200" + And the public should not be able to download file "/testfile.txt" from inside the last public link shared folder using the public WebDAV API without a password + And the public should not be able to download file "/testfile.txt" from inside the last public link shared folder using the public WebDAV API with password "wrong pass" + But the public should be able to download file "/testfile.txt" from inside the last public link shared folder using the public WebDAV API with password "6afsa0Q;A3 +i^m[" + Examples: + | permissions-role | + | Edit | + | Upload | + + + Scenario Outline: user tries to update a public link with a password that does not comply with the password policy + Given the following configs have been set: + | config | value | + | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false | + | OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true | + | OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 13 | + | OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 | + | OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 | + | OCIS_PASSWORD_POLICY_MIN_DIGITS | 1 | + | OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 | + And user "Alice" has been created with default attributes + And user "Alice" has created folder "folder" + And user "Alice" has uploaded file with content "test file" to "folder/testfile.txt" + And using SharingNG + And user "Alice" has created the following resource link share: + | resource | folder | + | space | Personal | + | permissionsRole | | + | password | 6a0Q;A3 +i^m[ | + When user "Alice" sets the following password for the last link share using the Graph API: + | resource | folder | + | space | Personal | + | password | Pws^ | + Then the HTTP status code should be "400" + Examples: + | permissions-role | + | Edit | + | Upload | + | File Drop | + + + Scenario Outline: user creates a public link with a password in accordance with the password policy (valid cases) + Given the config "" has been set to "" + And user "Alice" has been created with default attributes + And using SharingNG + And user "Alice" has uploaded file with content "test file" to "/testfile.txt" + When user "Alice" creates the following resource link share using the Graph API: + | resource | testfile.txt | + | space | Personal | + | permissionsRole | View | + | password | | + Then the HTTP status code should be "200" + And the public should not be able to download file "/testfile.txt" from inside the last public link shared folder using the public WebDAV API without a password + And the public should not be able to download file "/testfile.txt" from inside the last public link shared folder using the public WebDAV API with password "wrong pass" + But the public should be able to download file "/testfile.txt" from inside the last public link shared folder using the public WebDAV API with password "" + Examples: + | config | config-value | password | + | OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 4 | Ps-1 | + | OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 14 | Ps1:with space | + | OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 4 | PS1:test | + | OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 3 | PS1:TeƒsT | + | OCIS_PASSWORD_POLICY_MIN_DIGITS | 2 | PS1:test2 | + | OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 | PS1:test pass | + | OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 33 | pS1! #$%&'()*+,-./:;<=>?@[\]^_`{ }~ | + | OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 5 | 1sameCharacterShouldWork!!!!! | + + + Scenario Outline: user tries to create a public link with a password that does not comply with the password policy (invalid cases) + Given user "Alice" has been created with default attributes + And user "Alice" has uploaded file with content "test file" to "/testfile.txt" + When user "Alice" creates the following resource link share using the Graph API: + | resource | testfile.txt | + | space | Personal | + | permissionsRole | View | + | password | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": ["code","innererror","message"], + "properties": { + "code": {"const": "invalidRequest"}, + "innererror": { + "type": "object", + "required": ["date","request-id"] + }, + "message": {"const": ""} + } + } + } + } + """ + Examples: + | password | message | + | 1Pw: | at least 8 characters are required | + | 1P:12345 | at least 1 lowercase letters are required | + | test-123 | at least 1 uppercase letters are required | + | Test-psw | at least 1 numbers are required | diff --git a/tests/acceptance/features/apiSharingNgLinkSharePermission/updateLinkShare.feature b/tests/acceptance/features/apiSharingNgItemLinkShare/updateItemLinkShare.feature similarity index 100% rename from tests/acceptance/features/apiSharingNgLinkSharePermission/updateLinkShare.feature rename to tests/acceptance/features/apiSharingNgItemLinkShare/updateItemLinkShare.feature diff --git a/tests/acceptance/features/apiSharingNg1/filterPermissions.feature b/tests/acceptance/features/apiSharingNgPermissions/filterPermissions.feature similarity index 100% rename from tests/acceptance/features/apiSharingNg1/filterPermissions.feature rename to tests/acceptance/features/apiSharingNgPermissions/filterPermissions.feature diff --git a/tests/acceptance/features/apiSharingNg1/listPermissions.feature b/tests/acceptance/features/apiSharingNgPermissions/listPermissions.feature similarity index 100% rename from tests/acceptance/features/apiSharingNg1/listPermissions.feature rename to tests/acceptance/features/apiSharingNgPermissions/listPermissions.feature diff --git a/tests/acceptance/features/apiSharingNg1/enableDisablePermissionsRole.feature b/tests/acceptance/features/apiSharingNgShares/enableDisablePermissionsRole.feature similarity index 100% rename from tests/acceptance/features/apiSharingNg1/enableDisablePermissionsRole.feature rename to tests/acceptance/features/apiSharingNgShares/enableDisablePermissionsRole.feature diff --git a/tests/acceptance/features/apiSharingNg1/enableDisableShareSync.feature b/tests/acceptance/features/apiSharingNgShares/enableDisableShareSync.feature similarity index 100% rename from tests/acceptance/features/apiSharingNg1/enableDisableShareSync.feature rename to tests/acceptance/features/apiSharingNgShares/enableDisableShareSync.feature diff --git a/tests/acceptance/features/apiSharingNg1/sharedByMe.feature b/tests/acceptance/features/apiSharingNgShares/sharedByMe.feature similarity index 100% rename from tests/acceptance/features/apiSharingNg1/sharedByMe.feature rename to tests/acceptance/features/apiSharingNgShares/sharedByMe.feature diff --git a/tests/acceptance/features/apiSharingNg1/sharedWithMe.feature b/tests/acceptance/features/apiSharingNgShares/sharedWithMe.feature similarity index 100% rename from tests/acceptance/features/apiSharingNg1/sharedWithMe.feature rename to tests/acceptance/features/apiSharingNgShares/sharedWithMe.feature diff --git a/tests/acceptance/features/apiSharingNg1/sharedWithMeSyncDisabled.feature b/tests/acceptance/features/apiSharingNgShares/sharedWithMeSyncDisabled.feature similarity index 100% rename from tests/acceptance/features/apiSharingNg1/sharedWithMeSyncDisabled.feature rename to tests/acceptance/features/apiSharingNgShares/sharedWithMeSyncDisabled.feature diff --git a/tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature b/tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature similarity index 100% rename from tests/acceptance/features/apiSharingNgLinkSharePermission/enforcePasswordPublicLink.feature rename to tests/acceptance/features/coreApiSharePublicLink2/enforcePasswordPublicLink.feature