diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md index c79de31f0c1..1dc2abe3f75 100644 --- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md @@ -295,64 +295,6 @@ cannot share a folder with create permission #### Expiration date of user shares -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:51](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L51) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:52](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L52) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:75](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L75) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:76](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L76) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:101](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L101) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:102](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L102) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:127](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L127) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:128](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L128) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:278](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L278) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:279](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L279) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:300](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L300) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:301](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L301) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:322](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L322) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:323](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L323) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:345](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L345) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:346](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L346) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:362](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L362) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:363](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L363) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:379](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L379) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:380](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L380) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:575](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L575) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:576](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L576) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:598](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L598) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:599](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L599) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:600](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L600) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:601](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L601) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:602](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L602) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:623](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L623) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:624](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L624) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:625](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L625) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:626](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L626) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:627](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L627) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:628](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L628) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:629](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L629) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:630](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L630) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:631](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L631) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:632](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L632) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:633](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L633) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:634](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L634) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:655](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L655) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:656](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L656) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:657](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L657) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:658](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L658) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:659](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L659) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:660](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L660) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:681](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L681) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:682](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L682) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:683](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L683) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:684](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L684) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:685](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L685) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:686](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L686) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:707](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L707) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:708](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L708) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:731](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L731) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:732](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L732) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:755](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L755) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:756](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L756) -- [coreApiShareReshareToShares3/reShareWithExpiryDate.feature:33](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareReshareToShares3/reShareWithExpiryDate.feature#L33) - [coreApiShareReshareToShares3/reShareWithExpiryDate.feature:34](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareReshareToShares3/reShareWithExpiryDate.feature#L34) - [coreApiShareReshareToShares3/reShareWithExpiryDate.feature:85](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareReshareToShares3/reShareWithExpiryDate.feature#L85) - [coreApiShareReshareToShares3/reShareWithExpiryDate.feature:86](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareReshareToShares3/reShareWithExpiryDate.feature#L86) @@ -383,27 +325,6 @@ cannot share a folder with create permission #### Expiration date of group shares -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:174](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L174) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:175](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L175) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:200](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L200) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:201](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L201) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:228](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L228) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:229](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L229) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:257](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L257) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:258](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L258) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:402](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L402) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:403](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L403) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:426](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L426) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:427](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L427) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:450](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L450) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:451](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L451) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:475](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L475) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:476](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L476) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:496](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L496) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:497](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L497) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:517](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L517) -- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:518](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L518) -- [coreApiShareReshareToShares3/reShareWithExpiryDate.feature:59](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareReshareToShares3/reShareWithExpiryDate.feature#L59) - [coreApiShareReshareToShares3/reShareWithExpiryDate.feature:60](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareReshareToShares3/reShareWithExpiryDate.feature#L60) - [coreApiShareReshareToShares3/reShareWithExpiryDate.feature:115](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareReshareToShares3/reShareWithExpiryDate.feature#L115) - [coreApiShareReshareToShares3/reShareWithExpiryDate.feature:116](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareReshareToShares3/reShareWithExpiryDate.feature#L116) diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index 7a195833a9f..4add132320b 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -40,7 +40,7 @@ The expected failures in this file are from features in the owncloud/ocis repo. ### [Copy or move on an existing resource doesn't create a new version but deletes instead](https://github.com/owncloud/ocis/issues/4797) - [apiSpacesShares/moveSpaces.feature:306](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L306) - [apiSpacesShares/copySpaces.feature:710](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/copySpaces.feature#L710) -- [apiSpacesShares/copySpaces.feature:748](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/copySpaces.feature#L748) +- [apiSpacesShares/copySpaces.feature:751](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/copySpaces.feature#L751) ### [Creating group with empty name returns status code 200](https://github.com/owncloud/ocis/issues/5050) - [apiGraph/createGroup.feature:40](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/createGroup.feature#L40) @@ -100,8 +100,8 @@ The expected failures in this file are from features in the owncloud/ocis repo. - [apiAsyncUpload/delayPostprocessing.feature:15](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiAsyncUpload/delayPostprocessing.feature#L15) - [apiAsyncUpload/delayPostprocessing.feature:16](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiAsyncUpload/delayPostprocessing.feature#L16) -#### [Normal user can get expanded members information of a group](https://github.com/owncloud/ocis/issues/5604) -- [apiGraph/getGroup.feature:100](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/getGroup.feature#L100) +#### [Sharing to a group with an expiration date does not work #5442](https://github.com/owncloud/ocis/issues/5442) +- [apiSpacesShares/shareSubItemOfSpace.feature:99](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareSubItemOfSpace.feature#L99) Note: always have an empty line at the end of this file. The bash script that processes this file requires that the last line has a newline on the end. diff --git a/tests/acceptance/features/apiContract/spacesReport.feature b/tests/acceptance/features/apiContract/spacesReport.feature index 48fe1bef5f8..a764e4f8f3e 100644 --- a/tests/acceptance/features/apiContract/spacesReport.feature +++ b/tests/acceptance/features/apiContract/spacesReport.feature @@ -19,7 +19,10 @@ Feature: Report test Scenario: check the response of the found folder - Given user "Alice" shares the following entity "folderMain" inside of space "find data" with user "Brian" with role "viewer" + Given user "Alice" has created a share inside of space "find data" with settings: + | path | folderMain | + | shareWith | Brian | + | role | viewer | And user "Brian" has accepted share "/folderMain" offered by user "Alice" When user "Brian" searches for "SubFolder1" using the WebDAV API Then the HTTP status code should be "207" @@ -35,7 +38,10 @@ Feature: Report test Scenario: check the response of the found file - Given user "Alice" shares the following entity "folderMain" inside of space "find data" with user "Brian" with role "editor" + Given user "Alice" has created a share inside of space "find data" with settings: + | path | folderMain | + | shareWith | Brian | + | role | editor | And user "Brian" has accepted share "/folderMain" offered by user "Alice" When user "Brian" searches for "insideTheFolder.txt" using the WebDAV API Then the HTTP status code should be "207" diff --git a/tests/acceptance/features/apiSpaces/editPublicLinkOfSpace.feature b/tests/acceptance/features/apiSpaces/editPublicLinkOfSpace.feature index e065f30815e..e3e6f63f4a9 100644 --- a/tests/acceptance/features/apiSpaces/editPublicLinkOfSpace.feature +++ b/tests/acceptance/features/apiSpaces/editPublicLinkOfSpace.feature @@ -31,7 +31,6 @@ Feature: A manager of the space can edit public link | permissions | | | password | | | name | | - | expireDate | | Then the HTTP status code should be "200" And the OCS status code should be "200" And the OCS status message should be "OK" @@ -44,13 +43,12 @@ Feature: A manager of the space can edit public link | share_type | public_link | | displayname_owner | %displayname% | | name | | - | expiration | | And the public should be able to download file "/test.txt" from inside the last public link shared folder using the new public WebDAV API with password "" And the downloaded content should be "some content" Examples: - | permissions | expectedPermissions | password | linkName | expireDate | - | 5 | read,create | newPass | | | - | 15 | read,update,create,delete | | newName | 2042-03-25T23:59:59+0100 | + | permissions | expectedPermissions | password | linkName | + | 5 | read,create | newPass | | + | 15 | read,update,create,delete | | newName | Scenario Outline: All members can see a created public link diff --git a/tests/acceptance/features/apiSpaces/search.feature b/tests/acceptance/features/apiSpaces/search.feature index e09f23f679c..2e6d4db7da6 100644 --- a/tests/acceptance/features/apiSpaces/search.feature +++ b/tests/acceptance/features/apiSpaces/search.feature @@ -42,7 +42,10 @@ Feature: Search Scenario: Brian can find data from the Shares - Given user "Alice" shares the following entity "folderMain" inside of space "find data" with user "Brian" with role "viewer" + Given user "Alice" has created a share inside of space "find data" with settings: + | path | folderMain | + | shareWith | Brian | + | role | viewer | And user "Brian" has accepted share "/folderMain" offered by user "Alice" When user "Brian" searches for "folder" using the WebDAV API Then the HTTP status code should be "207" @@ -64,7 +67,10 @@ Feature: Search Scenario: User cannot find pending folder - Given user "Alice" shares the following entity "folderMain" inside of space "find data" with user "Brian" with role "viewer" + Given user "Alice" has created a share inside of space "find data" with settings: + | path | folderMain | + | shareWith | Brian | + | role | viewer | When user "Brian" searches for "folder" using the WebDAV API Then the HTTP status code should be "207" And the search result should contain "0" entries @@ -75,7 +81,10 @@ Feature: Search Scenario: User cannot find declined folder - Given user "Alice" shares the following entity "folderMain" inside of space "find data" with user "Brian" with role "viewer" + Given user "Alice" has created a share inside of space "find data" with settings: + | path | folderMain | + | shareWith | Brian | + | role | viewer | And user "Brian" has declined share "/folderMain" offered by user "Alice" When user "Brian" searches for "folder" using the WebDAV API Then the HTTP status code should be "207" diff --git a/tests/acceptance/features/apiSpaces/tag.feature b/tests/acceptance/features/apiSpaces/tag.feature index c452072a819..70bd3f8c232 100644 --- a/tests/acceptance/features/apiSpaces/tag.feature +++ b/tests/acceptance/features/apiSpaces/tag.feature @@ -102,7 +102,10 @@ Feature: Tag Given user "Alice" has created the following tags for folder "folderMain" of the space "use-tag": | folderTag | | marketing | - And user "Alice" has shared the following entity "folderMain" inside of space "use-tag" with user "Brian" with role "viewer" + And user "Alice" has created a share inside of space "use-tag" with settings: + | path | folderMain | + | shareWith | Brian | + | role | viewer | When user "Brian" lists all available tags via the GraphApi Then the HTTP status code should be "200" And the response should not contain following tags: @@ -117,7 +120,10 @@ Feature: Tag Scenario Outline: The recipient of the shared resource tries to create a tag - Given user "Alice" has shared the following entity "folderMain" inside of space "use-tag" with user "Brian" with role "" + Given user "Alice" has created a share inside of space "use-tag" with settings: + | path | folderMain | + | shareWith | Brian | + | role | | And user "Brian" has accepted share "/folderMain" offered by user "Alice" When user "Brian" creates the following tags for "" of space "Shares": | tag in a shared resource | @@ -139,7 +145,10 @@ Feature: Tag Scenario Outline: The recipient of the shared resource tries to remove a tag - Given user "Alice" has shared the following entity "folderMain" inside of space "use-tag" with user "Brian" with role "" + Given user "Alice" has created a share inside of space "use-tag" with settings: + | path | folderMain | + | shareWith | Brian | + | role | | And user "Alice" has created the following tags for "" of the space "use-tag": | tag in a shared resource | | second tag | diff --git a/tests/acceptance/features/apiSpacesShares/copySpaces.feature b/tests/acceptance/features/apiSpacesShares/copySpaces.feature index 154725fd824..ef78faa1134 100644 --- a/tests/acceptance/features/apiSpacesShares/copySpaces.feature +++ b/tests/acceptance/features/apiSpacesShares/copySpaces.feature @@ -731,7 +731,10 @@ Feature: copy file And user "Alice" has created a space "Project" with the default quota using the GraphApi And user "Alice" has created a folder "/newfolder" in space "Project" And user "Alice" has uploaded a file inside space "Project" with content "some content" to "/newfolder/personal.txt" - And user "Alice" shares the following entity "newfolder" inside of space "Project" with user "Brian" with role "editor" + And user "Alice" creates a share inside of space "Project" with settings: + | path | newfolder | + | shareWith | Brian | + | role | editor | And user "Brian" has accepted share "/newfolder" offered by user "Alice" And user "Brian" has uploaded file with content "new content" to "/personal.txt" When user "Brian" copies file "/personal.txt" from space "Personal" to "/newfolder/personal (1).txt" inside space "Shares" using the WebDAV API @@ -751,13 +754,16 @@ Feature: copy file And user "Alice" has created a folder "/newfolder" in space "Project" And user "Alice" has uploaded a file inside space "Project" with content "old content version 1" to "/newfolder/personal.txt" And user "Alice" has uploaded a file inside space "Project" with content "old content version 2" to "/newfolder/personal.txt" - And user "Alice" shares the following entity "newfolder" inside of space "Project" with user "Brian" with role "editor" + And user "Alice" creates a share inside of space "Project" with settings: + | path | newfolder | + | shareWith | Brian | + | role | editor | And user "Brian" has accepted share "/newfolder" offered by user "Alice" And user "Brian" has uploaded file with content "new content" to "/personal.txt" When user "Brian" overwrites file "/personal.txt" from space "Personal" to "/newfolder/personal.txt" inside space "Shares" while copying using the WebDAV API Then the HTTP status code should be "204" And for user "Alice" the space "Project" should contain these entries: - | newfolder/personal.txt | + | newfolder/personal.txt | And for user "Alice" the content of the file "/newfolder/personal.txt" of the space "Project" should be "new content" When user "Alice" downloads version of the file "/newfolder/personal.txt" with the index "1" of the space "Project" using the WebDAV API Then the HTTP status code should be "200" diff --git a/tests/acceptance/features/apiSpacesShares/shareSubItemOfSpace.feature b/tests/acceptance/features/apiSpacesShares/shareSubItemOfSpace.feature index 228524400d9..8d8a6a01284 100644 --- a/tests/acceptance/features/apiSpacesShares/shareSubItemOfSpace.feature +++ b/tests/acceptance/features/apiSpacesShares/shareSubItemOfSpace.feature @@ -18,43 +18,58 @@ Feature: Share a file or folder that is inside a space And user "Alice" has created a space "share sub-item" with the default quota using the GraphApi And user "Alice" has created a folder "folder" in space "share sub-item" And user "Alice" has uploaded a file inside space "share sub-item" with content "some content" to "file.txt" - And using new DAV path + And using new DAV path + - Scenario Outline: A manager of the space can share an entity inside project space to another user with role - When user "Alice" shares the following entity "" inside of space "share sub-item" with user "Brian" with role "" + And user "Alice" creates a share inside of space "share sub-item" with settings: + | path | | + | shareWith | Brian | + | role | | + | expireDate | | Then the HTTP status code should be "200" And the OCS status code should be "200" And the OCS status message should be "OK" When user "Brian" accepts share "/" offered by user "Alice" using the sharing API - And as "Brian" "Shares/" should exist + Then as "Brian" "Shares/" should exist + And the information about the last share for user "Brian" should include + | expiration | | Examples: - | entity | type | role | - | folder | folder | viewer | - | folder | folder | editor | - | file.txt | file | viewer | - | file.txt | file | editor | + | entity | type | role | expireDate | expiration | + | folder | folder | viewer | | | + | folder | folder | editor | 2042-03-25T23:59:59+0100 | 2042-03-25 | + | file.txt | file | viewer | | | + | file.txt | file | editor | 2042-03-25T23:59:59+0100 | 2042-03-25 | - Scenario Outline: An user participant of the project space with manager role can share an entity to another user + Scenario Outline: A user participant of the project space with manager role can share an entity to another user Given user "Alice" has shared a space "share sub-item" to user "Brian" with role "manager" - When user "Brian" shares the following entity "" inside of space "share sub-item" with user "Bob" with role "" + When user "Brian" creates a share inside of space "share sub-item" with settings: + | path | | + | shareWith | Bob | + | role | | + | expireDate | | Then the HTTP status code should be "200" And the OCS status code should be "200" And the OCS status message should be "OK" When user "Bob" accepts share "/" offered by user "Brian" using the sharing API - And as "Bob" "Shares/" should exist + Then as "Bob" "Shares/" should exist + And the information about the last share for user "Brian" should include + | expiration | | Examples: - | entity | type | role | - | folder | folder | viewer | - | folder | folder | editor | - | file.txt | file | viewer | - | file.txt | file | editor | + | entity | type | role | expireDate | expiration | + | folder | folder | viewer | 2042-03-25T23:59:59+0100 | 2042-03-25 | + | folder | folder | editor | | | + | file.txt | file | viewer | 2042-03-25T23:59:59+0100 | 2042-03-25 | + | file.txt | file | editor | | | - Scenario Outline: An user participant of the project space without space manager role cannot share an entity to another user + Scenario Outline: A user participant of the project space without space manager role cannot share an entity to another user Given user "Alice" has shared a space "share sub-item" to user "Brian" with role "" - When user "Brian" shares the following entity "" inside of space "share sub-item" with user "Bob" with role "editor" + When user "Brian" creates a share inside of space "share sub-item" with settings: + | path | | + | shareWith | Bob | + | role | editor | Then the HTTP status code should be "" And the OCS status code should be "" And the OCS status message should be "" @@ -66,9 +81,12 @@ Feature: Share a file or folder that is inside a space | folder | viewer | 404 | No share permission | - Scenario Outline: An user participant of the project space can see the created resources share + Scenario Outline: A user participant of the project space can see the created resources share Given user "Alice" has shared a space "share sub-item" to user "Brian" with role "" - When user "Alice" shares the following entity "file.txt" inside of space "share sub-item" with user "Bob" with role "editor" + When user "Alice" creates a share inside of space "share sub-item" with settings: + | path | file.txt | + | shareWith | Bob | + | role | editor | Then for user "Alice" the space "share sub-item" should contain the last created share of the file "file.txt" And for user "Brian" the space "share sub-item" should contain the last created share of the file "file.txt" Examples: @@ -76,3 +94,35 @@ Feature: Share a file or folder that is inside a space | editor | | viewer | | manager | + + + Scenario: A user shares the folder to the group + Given group "sales" has been created + And the administrator has added a user "Brian" to the group "sales" using GraphApi + When user "Alice" creates a share inside of space "share sub-item" with settings: + | path | folder | + | shareWith | sales | + | shareType | 1 | + | role | viewer | + | expireDate | 2042-01-01T23:59:59+0100 | + Then the HTTP status code should be "200" + And the OCS status code should be "200" + And the OCS status message should be "OK" + When user "Brian" accepts share "/folder" offered by user "Alice" using the sharing API + Then as "Brian" folder "Shares/folder" should exist + And the information about the last share for user "Brian" should include + | expiration | 2042-01-01 | + + + Scenario: A user changes the expiration date + Given user "Alice" has created a share inside of space "share sub-item" with settings: + | path | folder | + | shareWith | Brian | + | role | viewer | + | expireDate | 2042-01-01T23:59:59+0100 | + And user "Brian" has accepted share "/folder" offered by user "Alice" + When user "Alice" changes the last share with settings: + | expireDate | 2044-01-01T23:59:59.999+01:00 | + Then the HTTP status code should be "200" + And the information about the last share for user "Brian" should include + | expiration | 2044-01-01 | diff --git a/tests/acceptance/features/bootstrap/Sharing.php b/tests/acceptance/features/bootstrap/Sharing.php index e60563bbf6d..38347fca68f 100644 --- a/tests/acceptance/features/bootstrap/Sharing.php +++ b/tests/acceptance/features/bootstrap/Sharing.php @@ -1030,14 +1030,7 @@ public function updateLastShareWithSettings( $this->shareFields ); $bodyRows = $body->getRowsHash(); - if (\array_key_exists('expireDate', $bodyRows)) { - $dateModification = $bodyRows['expireDate']; - if (!empty($bodyRows['expireDate'])) { - $bodyRows['expireDate'] = \date('Y-m-d', \strtotime($dateModification)); - } else { - $bodyRows['expireDate'] = ''; - } - } + if (\array_key_exists('password', $bodyRows)) { $bodyRows['password'] = $this->getActualPassword($bodyRows['password']); } @@ -1283,7 +1276,7 @@ public function isFieldInResponse(string $field, ?string $contentExpected, bool } Assert::assertIsObject($data, __METHOD__ . " data not found in response XML"); - $dateFieldsArrayToConvert = ['expiration', 'original_date', 'new_date']; + $dateFieldsArrayToConvert = ['original_date', 'new_date']; //do not try to convert empty date if ((string) \in_array($field, \array_merge($dateFieldsArrayToConvert)) && !empty($contentExpected)) { $timestamp = \strtotime($contentExpected, $this->getServerShareTimeFromLastResponse()); @@ -1305,6 +1298,10 @@ public function isFieldInResponse(string $field, ?string $contentExpected, bool if (isset($element->$field)) { $fieldIsSet = true; $value = (string) $element->$field; + // convert expiration to Y-m-d format. bug #5424 + if ($field === "expiration") { + $value = (preg_split("/[\sT]+/", $value))[0]; + } if ($this->doesFieldValueMatchExpectedContent( $field, $value, @@ -2386,6 +2383,21 @@ public function userGetsAllTheSharesSharedWithHimUsingTheSharingApi(string $user ); } + /** + * @When the information about the last share for user :user should include + * + * @param string $user + * @param TableNode $table + * + * @return void + */ + public function userGetsTheLastShareSharedWithHimUsingTheSharingApi(string $user, $table):void { + $user = $this->getActualUsername($user); + $shareId = $this->getLastPublicLinkShareId(); + $this->getShareData($user, $shareId); + $this->checkFields($user, $table); + } + /** * @When /^user "([^"]*)" gets the (|pending)\s?(user|group|user and group|public link) shares shared with him using the sharing API$/ * diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index 2d23fa9c8d8..5fd0a874b08 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -336,7 +336,7 @@ public function getFileId(string $user, string $spaceName, string $fileName): st } /** - * The method returns folderId + * The method returns "fileid" from the PROPFIND response * * @param string $user * @param string $spaceName @@ -345,7 +345,7 @@ public function getFileId(string $user, string $spaceName, string $fileName): st * @return string * @throws GuzzleException */ - public function getFolderId(string $user, string $spaceName, string $folderName): string { + public function getResourceId(string $user, string $spaceName, string $folderName): string { $space = $this->getSpaceByName($user, $spaceName); // For a level 1 folder, the parent is space so $folderName = '' if ($folderName === $space["name"]) { @@ -1907,24 +1907,32 @@ public function sendShareSpaceRequest( } /** - * Request to send share of resource inside of space + * @When /^user "([^"]*)" creates a share inside of space "([^"]*)" with settings:$/ * * @param string $user - * @param string $entity * @param string $spaceName - * @param string $userRecipient - * @param string $role + * @param TableNode $table * * @return void * @throws GuzzleException */ - public function sendRequestForShareOfEntityInsideOfSpace(string $user, string $entity, string $spaceName, string $userRecipient, string $role):void { - $space = $this->getSpaceByName($user, $spaceName); + public function createShareResource( + string $user, + string $spaceName, + TableNode $table + ): void { + $rows = $table->getRowsHash(); + $rows["path"] = \array_key_exists("path", $rows) ? $rows["path"] : null; + $rows["shareType"] = \array_key_exists("shareType", $rows) ? $rows["shareType"] : 0; + $rows["role"] = \array_key_exists("role", $rows) ? $rows["role"] : 'viewer'; + $rows["expireDate"] = \array_key_exists("expireDate", $rows) ? $rows["expireDate"] : null; + $body = [ - "space_ref" => $space['id'] . "/" . $entity, - "shareType" => 0, - "shareWith" => $userRecipient, - "role" => $role + "space_ref" => $this->getResourceId($user, $spaceName, $rows["path"]), + "shareWith" => $rows["shareWith"], + "shareType" => $rows["shareType"], + "expireDate" => $rows["expireDate"], + "role" => $rows["role"] ]; $fullUrl = $this->baseUrl . $this->ocsApiUrl; @@ -1940,51 +1948,61 @@ public function sendRequestForShareOfEntityInsideOfSpace(string $user, string $e } /** - * @When /^user "([^"]*)" shares the following entity "([^"]*)" inside of space "([^"]*)" with user "([^"]*)" with role "([^"]*)"$/ + * @Given /^user "([^"]*)" has created a share inside of space "([^"]*)" with settings:$/ * * @param string $user - * @param string $entity * @param string $spaceName - * @param string $userRecipient - * @param string $role + * @param TableNode $table * * @return void * @throws GuzzleException */ - public function sharesTheFollowingEntityInsideOfSpace( + public function hasSharedTheFollowingEntityInsideOfSpace( string $user, - string $entity, string $spaceName, - string $userRecipient, - string $role + TableNode $table ): void { - $this->sendRequestForShareOfEntityInsideOfSpace($user, $entity, $spaceName, $userRecipient, $role); + $this->createShareResource($user, $spaceName, $table); + Assert::assertEquals( + $this->featureContext->getResponse()->getStatusCode(), + 200, + "Expected response status code should be 200" + ); } /** - * @Given /^user "([^"]*)" has shared the following entity "([^"]*)" inside of space "([^"]*)" with user "([^"]*)" with role "([^"]*)"$/ + * @When /^user "([^"]*)" changes the last share with settings:$/ * * @param string $user - * @param string $entity - * @param string $spaceName - * @param string $userRecipient - * @param string $role + * @param TableNode $table * * @return void * @throws GuzzleException */ - public function hasSharedTheFollowingEntityInsideOfSpace( + public function changeShareResource( string $user, - string $entity, - string $spaceName, - string $userRecipient, - string $role + TableNode $table ): void { - $response = $this->sendRequestForShareOfEntityInsideOfSpace($user, $entity, $spaceName, $userRecipient, $role); - Assert::assertEquals( - $response->getStatusCode(), - 200, - "Expected response status code should be 200" + $shareId = $this->featureContext->getLastPublicLinkShareId(); + $rows = $table->getRowsHash(); + $rows["role"] = \array_key_exists("role", $rows) ? $rows["role"] : 'viewer'; + $rows["expireDate"] = \array_key_exists("expireDate", $rows) ? $rows["expireDate"] : null; + + $body = [ + "expireDate" => $rows["expireDate"], + ]; + + $fullUrl = $this->baseUrl . $this->ocsApiUrl . '/' . $shareId; + $this->featureContext->setResponse( + HttpRequestHelper::sendRequest( + $fullUrl, + "", + "PUT", + $this->featureContext->getActualUsername($user), + $this->featureContext->getPasswordForUser($user), + null, + $body + ) ); } @@ -3088,20 +3106,20 @@ public function theResponseShouldContain(string $method, string $user, string $s $resourceType = $xmlRes->xpath("//d:response/d:propstat/d:prop/d:getcontenttype")[0]->__toString(); if ($method === 'PROPFIND') { if (!$resourceType) { - Assert::assertEquals($this->getFolderId($user, $spaceNameOrMountPoint, $value), $responseValue, 'wrong fileId in the response'); + Assert::assertEquals($this->getResourceId($user, $spaceNameOrMountPoint, $value), $responseValue, 'wrong fileId in the response'); } else { Assert::assertEquals($this->getFileId($user, $spaceNameOrMountPoint, $value), $responseValue, 'wrong fileId in the response'); } } else { if ($resourceType === 'httpd/unix-directory') { - Assert::assertEquals($this->getFolderId($user, $spaceNameOrMountPoint, $value), $responseValue, 'wrong fileId in the response'); + Assert::assertEquals($this->getResourceId($user, $spaceNameOrMountPoint, $value), $responseValue, 'wrong fileId in the response'); } else { Assert::assertEquals($this->getFileId($user, $spaceNameOrMountPoint, $value), $responseValue, 'wrong fileId in the response'); } } break; case "oc:file-parent": - Assert::assertEquals($this->getFolderId($user, $spaceNameOrMountPoint, $value), $responseValue, 'wrong file-parentId in the response'); + Assert::assertEquals($this->getResourceId($user, $spaceNameOrMountPoint, $value), $responseValue, 'wrong file-parentId in the response'); break; case "oc:privatelink": Assert::assertEquals($this->getPrivateLink($user, $spaceNameOrMountPoint), $responseValue, 'cannot find private link for space or resource in the response'); diff --git a/tests/acceptance/features/bootstrap/TagContext.php b/tests/acceptance/features/bootstrap/TagContext.php index f8610b01771..331e3193531 100644 --- a/tests/acceptance/features/bootstrap/TagContext.php +++ b/tests/acceptance/features/bootstrap/TagContext.php @@ -84,7 +84,7 @@ public function theUserCreatesFollowingTags(string $user, string $fileOrFolder, } if ($fileOrFolder === 'folder') { - $resourceId = $this->spacesContext->getFolderId($user, $space, $resource); + $resourceId = $this->spacesContext->getResourceId($user, $space, $resource); } else { $resourceId = $this->spacesContext->getFileId($user, $space, $resource); } @@ -177,7 +177,7 @@ public function userRemovesTagsFromResourceOfTheSpace(string $user, string $file } if ($fileOrFolder === 'folder') { - $resourceId = $this->spacesContext->getFolderId($user, $space, $resource); + $resourceId = $this->spacesContext->getResourceId($user, $space, $resource); } else { $resourceId = $this->spacesContext->getFileId($user, $space, $resource); } diff --git a/tests/acceptance/features/coreApiSharePublicLink3/allowGroupToCreatePublicLinks.feature b/tests/acceptance/features/coreApiSharePublicLink3/allowGroupToCreatePublicLinks.feature new file mode 100644 index 00000000000..6133ba57fb1 --- /dev/null +++ b/tests/acceptance/features/coreApiSharePublicLink3/allowGroupToCreatePublicLinks.feature @@ -0,0 +1,110 @@ +@api @files_sharing-app-required @notToImplementOnOcis +Feature: public share sharers groups setting + As an admin + I should be able to allow only certain groups to create public links + So that random links are not generated on my file system + + Background: + Given group "grp1" has been created + And user "Alice" has been created with default attributes and without skeleton files + And user "Alice" has uploaded file with content "file to share with user" to "/fileToShare.txt" + + + Scenario: users present in public share shares groups can create new public link shares + Given parameter "public_share_sharers_groups_allowlist_enabled" of app "files_sharing" has been set to "yes" + And parameter "public_share_sharers_groups_allowlist" of app "files_sharing" has been set to '["grp1"]' + And user "Alice" has been added to group "grp1" + When user "Alice" creates a public link share using the sharing API with settings + | path | fileToShare.txt | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And the fields of the last response to user "Alice" should include + | item_type | file | + | mimetype | text/plain | + | file_target | /fileToShare.txt | + | path | /fileToShare.txt | + | permissions | read | + | share_type | public_link | + | displayname_file_owner | %displayname% | + | displayname_owner | %displayname% | + | uid_file_owner | %username% | + | uid_owner | %username% | + | name | | + + + Scenario: users not present in public share shares groups cannot create a new public link share + Given parameter "public_share_sharers_groups_allowlist_enabled" of app "files_sharing" has been set to "yes" + And parameter "public_share_sharers_groups_allowlist" of app "files_sharing" has been set to '["grp1"]' + When user "Alice" creates a public link share using the sharing API with settings + | path | fileToShare.txt | + Then the OCS status code should be "403" + And the HTTP status code should be "200" + And the OCS status message should be "Public link creation is only possible for certain groups" + + + Scenario: existing links can still be updated by sharers even if they are not present in public share sharers groups + Given user "Alice" has created a public link share with settings + | path | /fileToShare.txt | + | permissions | read | + And parameter "public_share_sharers_groups_allowlist_enabled" of app "files_sharing" has been set to "yes" + And parameter "public_share_sharers_groups_allowlist" of app "files_sharing" has been set to '["grp1"]' + When user "Alice" updates the last public link share using the sharing API with + | expireDate | 2040-01-01T23:59:59+0100 | + Then the HTTP status code should be "200" + And the OCS status code should be "100" + And the fields of the last response to user "Alice" should include + | expiration | 2040-01-01 22:59:59 | + + + Scenario: existing links can still be deleted by sharers even if they are not present in public share sharers groups + Given user "Alice" has created a public link share with settings + | path | /fileToShare.txt | + | permissions | read | + | name | shared-link | + And parameter "public_share_sharers_groups_allowlist_enabled" of app "files_sharing" has been set to "yes" + And parameter "public_share_sharers_groups_allowlist" of app "files_sharing" has been set to '["grp1"]' + When user "Alice" deletes public link share named "shared-link" in file "fileToShare.txt" using the sharing API + Then the HTTP status code should be "200" + And the OCS status code should be "100" + And as user "Alice" the file "fileToShare.txt" should not have any shares + + + Scenario: creating a new link share is not restricted if no groups are inside the allowed public share sharers groups even if allowlist is enabled + Given parameter "public_share_sharers_groups_allowlist_enabled" of app "files_sharing" has been set to "yes" + When user "Alice" creates a public link share using the sharing API with settings + | path | fileToShare.txt | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And the fields of the last response to user "Alice" should include + | item_type | file | + | mimetype | text/plain | + | file_target | /fileToShare.txt | + | path | /fileToShare.txt | + | permissions | read | + | share_type | public_link | + | displayname_file_owner | %displayname% | + | displayname_owner | %displayname% | + | uid_file_owner | %username% | + | uid_owner | %username% | + | name | | + + + Scenario: multiple groups can be added to public share sharers groups allow list + Given parameter "public_share_sharers_groups_allowlist_enabled" of app "files_sharing" has been set to "yes" + And user "Brian" has been created with default attributes and without skeleton files + And user "Carol" has been created with default attributes and without skeleton files + And user "Brian" has uploaded file with content "file to share with user" to "/fileToShare.txt" + And user "Carol" has uploaded file with content "file to share with user" to "/fileToShare.txt" + And group "grp2" has been created + And user "Alice" has been added to group "grp1" + And user "Brian" has been added to group "grp2" + And parameter "public_share_sharers_groups_allowlist" of app "files_sharing" has been set to '["grp1", "grp2"]' + When user "Alice" creates a public link share using the sharing API with settings + | path | fileToShare.txt | + And user "Brian" creates a public link share using the sharing API with settings + | path | fileToShare.txt | + And user "Carol" creates a public link share using the sharing API with settings + | path | fileToShare.txt | + Then the HTTP status code of responses on all endpoints should be "200" + And the OCS status code of responses on each endpoint should be "100, 100, 403" respectively + And the OCS status message should be "Public link creation is only possible for certain groups" diff --git a/tests/acceptance/features/coreApiSharePublicLink3/updatePublicLinkShare.feature b/tests/acceptance/features/coreApiSharePublicLink3/updatePublicLinkShare.feature index 629e76629dc..abe8651be5a 100644 --- a/tests/acceptance/features/coreApiSharePublicLink3/updatePublicLinkShare.feature +++ b/tests/acceptance/features/coreApiSharePublicLink3/updatePublicLinkShare.feature @@ -12,7 +12,7 @@ Feature: update a public link share And user "Alice" has created a public link share with settings | path | FOLDER | When user "Alice" updates the last public link share using the sharing API with - | expireDate | +3 days | + | expireDate | 2040-01-01T23:59:59+0100 | Then the OCS status code should be "" And the OCS status message should be "OK" And the HTTP status code should be "200" @@ -52,7 +52,7 @@ Feature: update a public link share And user "Alice" has created a public link share with settings | path | FOLDER | And user "Alice" has updated the last public link share with - | expireDate | +3 days | + | expireDate | 2033-01-31T23:59:59+0100 | When user "Alice" gets the info of the last public link share using the sharing API Then the OCS status code should be "" And the HTTP status code should be "200" @@ -65,7 +65,7 @@ Feature: update a public link share | file_target | /FOLDER | | permissions | read | | stime | A_NUMBER | - | expiration | +3 days | + | expiration | 2033-01-31 | | token | A_TOKEN | | storage | A_STRING | | mail_send | 0 | @@ -86,13 +86,13 @@ Feature: update a public link share | path | randomfile.txt | | password | %public% | When user "Alice" updates the last public link share using the sharing API with - | expireDate | +3 days | + | expireDate | 2040-01-01T23:59:59+0100 | Then the OCS status code should be "" And the HTTP status code should be "200" And the public should be able to download the last publicly shared file using the old public WebDAV API with password "%public%" and the content should be "Random data" And the public should be able to download the last publicly shared file using the new public WebDAV API with password "%public%" and the content should be "Random data" - @issue-ocis-2079 + @issue-ocis-2079 Examples: | ocs_api_version | ocs_status_code | | 1 | 100 | @@ -106,14 +106,47 @@ Feature: update a public link share | path | randomfile.txt | | password | %public% | When user "Alice" updates the last public link share using the sharing API with - #removing password is basically making password empty + #removing password is basically making password empty | password | %remove% | Then the OCS status code should be "" And the HTTP status code should be "200" And the public should be able to download the last publicly shared file using the old public WebDAV API without a password and the content should be "Random data" And the public should be able to download the last publicly shared file using the new public WebDAV API without a password and the content should be "Random data" - @issue-ocis-2079 + @issue-ocis-2079 + Examples: + | ocs_api_version | ocs_status_code | + | 1 | 100 | + | 2 | 200 | + + @issue-ocis-reva-336 + Scenario Outline: Creating a new public link share, updating its expiration date and getting its info (ocis Bug demonstration) + Given using OCS API version "" + And user "Alice" has created folder "FOLDER" + And user "Alice" has created a public link share with settings + | path | FOLDER | + And user "Alice" has updated the last public link share with + | expireDate | 2040-01-01T23:59:59+0100 | + When user "Alice" gets the info of the last public link share using the sharing API + Then the OCS status code should be "" + And the HTTP status code should be "200" + And the fields of the last response to user "Alice" should include + | id | A_STRING | + | item_type | folder | + | item_source | A_STRING | + | share_type | public_link | + | file_source | A_STRING | + | file_target | /FOLDER | + | permissions | read | + | stime | A_NUMBER | + | expiration | 2040-01-01 | + | token | A_TOKEN | + | storage | A_STRING | + | mail_send | 0 | + | uid_owner | %username% | + | displayname_owner | %displayname% | + | url | AN_URL | + | mimetype | httpd/unix-directory | Examples: | ocs_api_version | ocs_status_code | | 1 | 100 | @@ -337,7 +370,7 @@ Feature: update a public link share And uploading a file should work using the old public WebDAV API And uploading a file should work using the new public WebDAV API - @issue-ocis-2079 + @issue-ocis-2079 Examples: | ocs_api_version | ocs_status_code | | 1 | 100 | @@ -359,7 +392,7 @@ Feature: update a public link share And the HTTP status code of responses on all endpoints should be "403" And as "Alice" file "PARENT/CHILD/child.txt" should exist - @issue-ocis-2079 @issue-ocis-reva-292 + @issue-ocis-2079 @issue-ocis-reva-292 Examples: | ocs_api_version | | 1 | diff --git a/tests/acceptance/features/coreApiSharePublicLink3/updatePublicLinkShareOc10Issue37653.feature b/tests/acceptance/features/coreApiSharePublicLink3/updatePublicLinkShareOc10Issue37653.feature new file mode 100644 index 00000000000..139a6938931 --- /dev/null +++ b/tests/acceptance/features/coreApiSharePublicLink3/updatePublicLinkShareOc10Issue37653.feature @@ -0,0 +1,47 @@ +@api @files_sharing-app-required @public_link_share-feature-required @notToImplementOnOCIS +Feature: update a public link share + + Background: + Given using OCS API version "1" + And user "Alice" has been created with default attributes and without skeleton files + + @issue-37653 + Scenario Outline: API responds with a full set of parameters when owner changes the expireDate of a public share + Given using OCS API version "" + And user "Alice" has created folder "FOLDER" + And user "Alice" has created a public link share with settings + | path | FOLDER | + When user "Alice" updates the last public link share using the sharing API with + | expireDate | 2040-01-01T23:59:59+0100 | + Then the OCS status code should be "" + And the OCS status message should be "" + #And the OCS status message should be "Ok" + And the HTTP status code should be "200" + And the fields of the last response to user "Alice" should include + | id | A_STRING | + | share_type | public_link | + | uid_owner | %username% | + | displayname_owner | %displayname% | + | permissions | read | + | stime | A_NUMBER | + | parent | | + | expiration | A_STRING | + | token | A_STRING | + | uid_file_owner | %username% | + | displayname_file_owner | %displayname% | + | additional_info_owner | | + | additional_info_file_owner | | + | item_type | folder | + | item_source | A_STRING | + | path | /FOLDER | + | mimetype | httpd/unix-directory | + | storage_id | A_STRING | + | storage | A_NUMBER | + | file_source | A_STRING | + | file_target | /FOLDER | + | mail_send | 0 | + | name | | + Examples: + | ocs_api_version | ocs_status_code | + | 1 | 100 | + | 2 | 200 |