diff --git a/tests/TestHelpers/SharingHelper.php b/tests/TestHelpers/SharingHelper.php index 0d35f858cda..62ec4d8f9fa 100644 --- a/tests/TestHelpers/SharingHelper.php +++ b/tests/TestHelpers/SharingHelper.php @@ -39,7 +39,7 @@ class SharingHelper { 'update' => 2, 'create' => 4, 'delete' => 8, - 'share' => 16, + // 'share' => 16, 'invite' => 0 ]; @@ -123,7 +123,9 @@ public static function createShare( if ($permissions !== null) { $fd['permissions'] = self::getPermissionSum($permissions); - } + } else { + $fd['permissions'] = 1; + } if (!\in_array($ocsApiVersion, [1, 2], true)) { throw new InvalidArgumentException( diff --git a/tests/acceptance/config/behat-core.yml b/tests/acceptance/config/behat-core.yml index 9625eb63fb9..3808e0a13f3 100644 --- a/tests/acceptance/config/behat-core.yml +++ b/tests/acceptance/config/behat-core.yml @@ -145,26 +145,6 @@ default: - WebDavPropertiesContext: - OcisConfigContext: - coreApiShareReshareToShares1: - paths: - - "%paths.base%/../features/coreApiShareReshareToShares1" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - PublicWebDavContext: - - TrashbinContext: - - WebDavPropertiesContext: - - coreApiShareReshareToShares2: - paths: - - "%paths.base%/../features/coreApiShareReshareToShares2" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - PublicWebDavContext: - - TrashbinContext: - - WebDavPropertiesContext: - coreApiShareUpdateToShares: paths: - "%paths.base%/../features/coreApiShareUpdateToShares" diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md index 6aa3842d423..b3a940a092a 100644 --- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md @@ -133,18 +133,6 @@ cannot share a folder with create permission - [coreApiTrashbin/trashbinSharingToShares.feature:201](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiTrashbin/trashbinSharingToShares.feature#L201) - [coreApiTrashbin/trashbinSharingToShares.feature:224](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiTrashbin/trashbinSharingToShares.feature#L224) -#### [Expiration date for shares is not implemented](https://github.com/owncloud/ocis/issues/1250) - -#### Expiration date of user shares - -- [coreApiShareReshareToShares2/reShareWithExpiryDate.feature:33](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareReshareToShares2/reShareWithExpiryDate.feature#L33) -- [coreApiShareReshareToShares2/reShareWithExpiryDate.feature:34](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareReshareToShares2/reShareWithExpiryDate.feature#L34) - -#### Expiration date of group shares - -- [coreApiShareReshareToShares2/reShareWithExpiryDate.feature:56](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareReshareToShares2/reShareWithExpiryDate.feature#L56) -- [coreApiShareReshareToShares2/reShareWithExpiryDate.feature:57](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareReshareToShares2/reShareWithExpiryDate.feature#L57) - #### [Cannot move folder/file from one received share to another](https://github.com/owncloud/ocis/issues/2442) - [coreApiShareUpdateToShares/updateShare.feature:124](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L124) diff --git a/tests/acceptance/features/apiContract/sharesReport.feature b/tests/acceptance/features/apiContract/sharesReport.feature index 3a4b5bfca5f..2fe62b77b19 100644 --- a/tests/acceptance/features/apiContract/sharesReport.feature +++ b/tests/acceptance/features/apiContract/sharesReport.feature @@ -11,7 +11,7 @@ Feature: REPORT request to Shares space And user "Alice" has created folder "/folderMain" And user "Alice" has created folder "/folderMain/SubFolder1" And user "Alice" has created folder "/folderMain/SubFolder1/subFOLDER2" - And user "Alice" has shared entry "/folderMain" with user "Brian" with permissions "17" + And user "Alice" has shared entry "/folderMain" with user "Brian" with permissions "1" Scenario Outline: check the REPORT response of the found folder @@ -60,7 +60,7 @@ Feature: REPORT request to Shares space Given user "Brian" has disabled auto-accepting And using DAV path And user "Alice" has created folder "/folderToBrian" - And user "Alice" has shared entry "/folderToBrian" with user "Brian" with permissions "17" + And user "Alice" has shared entry "/folderToBrian" with user "Brian" with permissions "1" When user "Brian" searches for "folderToBrian" using the WebDAV API Then the HTTP status code should be "207" And the following headers should match these regular expressions diff --git a/tests/acceptance/features/apiNotification/notification.feature b/tests/acceptance/features/apiNotification/notification.feature index c6a55ca7d2b..087bf0d35bb 100644 --- a/tests/acceptance/features/apiNotification/notification.feature +++ b/tests/acceptance/features/apiNotification/notification.feature @@ -242,7 +242,7 @@ Feature: Notification Scenario Outline: get a notification about a file share in various languages Given user "Brian" has switched the system language to "" using the API - And user "Alice" has shared entry "textfile1.txt" with user "Brian" with permissions "17" + And user "Alice" has shared entry "textfile1.txt" with user "Brian" When user "Brian" lists all notifications Then the HTTP status code should be "200" And the JSON response should contain a notification message with the subject "" and the message-details should match @@ -272,7 +272,7 @@ Feature: Notification @env-config Scenario: get a notification about a file share in default languages Given the config "OCIS_DEFAULT_LANGUAGE" has been set to "de" - And user "Alice" has shared entry "textfile1.txt" with user "Brian" with permissions "17" + And user "Alice" has shared entry "textfile1.txt" with user "Brian" When user "Brian" lists all notifications Then the HTTP status code should be "200" And the JSON response should contain a notification message with the subject "Neue Freigabe" and the message-details should match diff --git a/tests/acceptance/features/apiReshare/disableReshare.feature b/tests/acceptance/features/apiReshare/disableReshare.feature deleted file mode 100644 index 733999c52b1..00000000000 --- a/tests/acceptance/features/apiReshare/disableReshare.feature +++ /dev/null @@ -1,57 +0,0 @@ -@env-config -Feature: share by disabling re-share - As a user - I want to share resources - So that other users can have access to them but cannot re-share them - - Background: - Given the config "FRONTEND_ENABLE_RESHARING" has been set to "false" - And these users have been created with default attributes and without skeleton files: - | username | - | Alice | - | Brian | - And user "Alice" has created folder "test" - - - Scenario Outline: share folder with different roles - Given using DAV path - When user "Alice" creates a share inside of space "Personal" with settings: - | path | test | - | shareWith | Brian | - | role | | - Then the HTTP status code should be "200" - And the OCS status code should be "200" - And the fields of the last response to user "Alice" sharing with user "Brian" should include - | permissions | | - Examples: - | dav-path-version | role | expected-permissions | - | old | editor | 15 | - | old | viewer | 1 | - | new | editor | 15 | - | new | viewer | 1 | - | spaces | editor | 15 | - | spaces | viewer | 1 | - - - Scenario Outline: try to re-share folder - Given using DAV path - And user "Carol" has been created with default attributes and without skeleton files - And user "Alice" has created a share inside of space "Personal" with settings: - | path | test | - | shareWith | Brian | - | role | | - When user "Brian" creates a share inside of space "Shares" with settings: - | path | test | - | shareWith | Carol | - | role | | - Then the HTTP status code should be "403" - And the OCS status code should be "403" - And the OCS status message should be "No share permission" - Examples: - | dav-path-version | role | - | old | editor | - | old | viewer | - | new | editor | - | new | viewer | - | spaces | editor | - | spaces | viewer | diff --git a/tests/acceptance/features/apiReshare/resharing.feature b/tests/acceptance/features/apiReshare/resharing.feature index ae19ae26a6a..225984e9ad5 100644 --- a/tests/acceptance/features/apiReshare/resharing.feature +++ b/tests/acceptance/features/apiReshare/resharing.feature @@ -1,10 +1,7 @@ -Feature: Resharing +Feature: re-share resources As a user - I want to reshare resources - So that other users can have access to them - - Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production - See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839 + I cannot to re-share resources + This feature has been removed from ocis Background: Given these users have been created with default attributes and without skeleton files: @@ -12,109 +9,71 @@ Feature: Resharing | Alice | | Brian | | Carol | - | Damian | - | Ember | - | Fred | - | Gina | - And user "Alice" has created folder "folder" - And user "Alice" has shared folder "folder" with user "Brian" with permissions "31" - And user "Brian" has shared folder "Shares/folder" with user "Carol" with permissions "31" - And user "Carol" has shared folder "Shares/folder" with user "Damian" with permissions "17" + And user "Alice" has created folder "test" - Scenario Outline: user should only be able to see direct outgoing shares not all the chain - Given user "Brian" has shared folder "Shares/folder" with user "Fred" with permissions "17" - When user "" gets all the shares inside the folder "Shares/folder" using the sharing API - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And the response should contain entries - And user "Brian" should not be included in the response - And user "Carol" included in the response - And user "Damian" included in the response - And user "Fred" included in the response + Scenario Outline: share folder with different roles + Given using DAV path + When user "Alice" creates a share inside of space "Personal" with settings: + | path | test | + | shareWith | Brian | + | role | | + Then the HTTP status code should be "200" + And the OCS status code should be "200" + And the fields of the last response to user "Alice" sharing with user "Brian" should include + | permissions | | Examples: - | user | visible-shares-no | carol-visible | damian-visible | fred-visible | - | Brian | 2 | should be | should not be | should be | - | Carol | 1 | should not be | should be | should not be | - | Damian | 0 | should not be | should not be | should not be | - | Fred | 0 | should not be | should not be | should not be | - - - Scenario: owners can see all the chain - When user "Alice" gets all the shares inside the folder "folder" using the sharing API - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And the response should contain 3 entries - And user "Brian" should be included in the response - And user "Carol" should be included in the response - And user "Damian" should be included in the response + | dav-path-version | role | expected-permissions | + | old | editor | 15 | + | old | viewer | 1 | + | new | editor | 15 | + | new | viewer | 1 | + | spaces | editor | 15 | + | spaces | viewer | 1 | - @skipOnRevaMaster - Scenario: user can't share with more permissions than they have - When user "Damian" shares folder "Shares/folder" with user "Ember" with permissions "31" using the sharing API - Then the OCS status code should be "403" - And the OCS status message should be "Cannot set the requested share permissions" - - - Scenario Outline: editing reshares - Given user "Carol" has shared folder "Shares/folder" with user "Fred" with permissions "17" - When user "" updates the last share using the sharing API with - | permissions | 31 | - Then the OCS status code should be "" - And user "Fred" able to upload file "filesForUpload/textfile.txt" to "/Shares/folder/textfile.txt" - Examples: - | user | ocs-status-code | can-upload | - | Alice | 100 | should be | - | Brian | 998 | should not be | - | Carol | 100 | should be | - - - Scenario Outline: deleting reshares - Given user "Carol" has shared folder "Shares/folder" with user "Gina" with permissions "17" - When user "" deletes the last share using the sharing API - Then the OCS status code should be "" - And as "Gina" folder "Shares/folder" - And as "Carol" folder "Shares/folder" should exist - Examples: - | user | ocs-status-code | exists | - | Alice | 100 | should not exist | - | Brian | 998 | should exist | - | Carol | 100 | should not exist | - - @skipOnRevaMaster - Scenario Outline: resharing folder with different permissions - When user "" shares folder "Shares/folder" with user "Ember" with permissions "" using the sharing API - Then the OCS status code should be "" - Examples: - | user | sharee-permissions | ocs-status-code | - | Brian | 17 | 100 | - | Carol | 31 | 100 | - | Damian | 17 | 100 | - | Damian | 27 | 403 | - | Damian | 31 | 403 | - @skipOnRevaMaster - Scenario Outline: Resharing files with different permissions - Given user "Alice" has uploaded file with content "Random data" to "/file.txt" - And user "Alice" has shared file "/file.txt" with user "Brian" with permissions "" - When user "Brian" shares file "Shares/file.txt" with user "Fred" with permissions "" using the sharing API - Then the OCS status code should be "" + Scenario Outline: try to re-share folder + Given using DAV path + And user "Alice" has created a share inside of space "Personal" with settings: + | path | test | + | shareWith | Brian | + | role | | + When user "Brian" creates a share inside of space "Shares" with settings: + | path | test | + | shareWith | Carol | + | role | | + Then the HTTP status code should be "403" + And the OCS status code should be "403" + And the OCS status message should be "No share permission" Examples: - | sharee-permissions | grantee-permissions | ocs-status-code | - | 17 | 17 | 100 | - | 17 | 19 | 403 | - | 19 | 19 | 100 | + | dav-path-version | role | + | old | editor | + | old | viewer | + | new | editor | + | new | viewer | + | spaces | editor | + | spaces | viewer | - Scenario Outline: resharing with group with different permissions - Given group "security department" has been created - And the administrator has added a user "Ember" to the group "security department" using the Graph API - And the administrator has added a user "Fred" to the group "security department" using the Graph API - When user "Brian" shares folder "Shares/folder" with group "security department" with permissions "" using the sharing API - Then the OCS status code should be "100" - And user "Ember" able to upload file "filesForUpload/textfile.txt" to "/Shares/folder/textfile.txt" - And user "Fred" able to upload file "filesForUpload/textfile.txt" to "/Shares/folder/textfile.txt" + Scenario Outline: try to re-share file + Given user "Alice" has uploaded file with content "other data" to "/textfile1.txt" + Given using DAV path + And user "Alice" has created a share inside of space "Personal" with settings: + | path | textfile1.txt | + | shareWith | Brian | + | role | | + When user "Brian" creates a share inside of space "Shares" with settings: + | path | textfile1.txt | + | shareWith | Carol | + | role | | + Then the HTTP status code should be "403" + And the OCS status code should be "403" + And the OCS status message should be "No share permission" Examples: - | sharee-permissions | can-upload | - | 17 | should not be | - | 31 | should be | + | dav-path-version | role | + | old | editor | + | old | viewer | + | new | editor | + | new | viewer | + | spaces | editor | + | spaces | viewer | diff --git a/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature b/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature index 46d95e8bf35..d164653f9b1 100644 --- a/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature +++ b/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature @@ -143,7 +143,7 @@ Feature: share resources where the sharee receives the share in multiple ways | file_target | /zzzfolder | | item_type | folder | | permissions | read,delete | - When user "Carol" shares folder "zzzfolder" with user "Alice" with permissions "read,share" using the sharing API + When user "Carol" shares folder "zzzfolder" with user "Alice" with permissions "read" using the sharing API Then the HTTP status code should be "200" And the OCS status code should be "" And as "Alice" the info about the last share by user "Carol" with user "Alice" should include diff --git a/tests/acceptance/features/coreApiSharePublicLink2/reShareAsPublicLinkToSharesNewDav.feature b/tests/acceptance/features/coreApiSharePublicLink2/reShareAsPublicLinkToSharesNewDav.feature index f681ac28924..72347dba001 100644 --- a/tests/acceptance/features/coreApiSharePublicLink2/reShareAsPublicLinkToSharesNewDav.feature +++ b/tests/acceptance/features/coreApiSharePublicLink2/reShareAsPublicLinkToSharesNewDav.feature @@ -25,44 +25,6 @@ Feature: reshare as public link | 1 | 200 | | 2 | 403 | - @skipOnReva - Scenario Outline: creating a public link from a share with share+read only permissions is allowed - Given using OCS API version "" - And user "Alice" has created folder "/test" - And user "Alice" has uploaded file with content "some content" to "/test/file.txt" - And user "Alice" has shared folder "/test" with user "Brian" with permissions "share,read" - When user "Brian" creates a public link share using the sharing API with settings - | path | /Shares/test | - | publicUpload | false | - | password | %public% | - Then the OCS status code should be "" - And the HTTP status code should be "200" - When the public downloads file "file.txt" from inside the last public link shared folder with password "%public%" using the new public WebDAV API - Then the HTTP status code should be "200" - And the downloaded content should be "some content" - But uploading a file should not work using the new public WebDAV API - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - @skipOnReva - Scenario Outline: creating an upload public link from a share with share+read only permissions is not allowed - Given using OCS API version "" - And user "Alice" has created folder "/test" - And user "Alice" has shared folder "/test" with user "Brian" with permissions "share,read" - When user "Brian" creates a public link share using the sharing API with settings - | path | /Shares/test | - | permissions | read,update,create,delete | - | publicUpload | true | - | password | %public% | - Then the OCS status code should be "403" - And the HTTP status code should be "" - Examples: - | ocs_api_version | http_status_code | - | 1 | 200 | - | 2 | 403 | - @skipOnReva Scenario Outline: creating a public link from a share with read+write permissions only is not allowed Given using OCS API version "" @@ -80,104 +42,17 @@ Feature: reshare as public link | 2 | 403 | @skipOnReva - Scenario Outline: creating a public link from a share with share+read+write permissions is allowed - Given using OCS API version "" - And user "Alice" has created folder "/test" - And user "Alice" has uploaded file with content "some content" to "/test/file.txt" - And user "Alice" has shared folder "/test" with user "Brian" with permissions "all" - When user "Brian" creates a public link share using the sharing API with settings - | path | /Shares/test | - | publicUpload | false | - | password | %public% | - Then the OCS status code should be "" - And the HTTP status code should be "200" - When the public downloads file "file.txt" from inside the last public link shared folder with password "%public%" using the new public WebDAV API - Then the HTTP status code should be "200" - And the downloaded content should be "some content" - But uploading a file should not work using the new public WebDAV API - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - @skipOnReva - Scenario Outline: creating an upload public link from a share with share+read+write permissions is allowed + Scenario Outline: creating a public link from a share with all permissions is not allowed Given using OCS API version "" And user "Alice" has created folder "/test" And user "Alice" has uploaded file with content "some content" to "/test/file.txt" And user "Alice" has shared folder "/test" with user "Brian" with permissions "all" When user "Brian" creates a public link share using the sharing API with settings - | path | /Shares/test | - | permissions | read,update,create,delete | - | publicUpload | true | - | password | %public% | - Then the OCS status code should be "" - And the HTTP status code should be "200" - When the public downloads file "file.txt" from inside the last public link shared folder with password "%public%" using the new public WebDAV API - Then the HTTP status code should be "200" - And the downloaded content should be "some content" - And uploading a file with password "%public%" should work using the new public WebDAV API - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - @skipOnReva - Scenario Outline: creating an upload public link from a sub-folder of a share with share+read only permissions is not allowed - Given using OCS API version "" - And user "Alice" has created folder "/test" - And user "Alice" has created folder "/test/sub" - And user "Alice" has shared folder "/test" with user "Brian" with permissions "share,read" - When user "Brian" creates a public link share using the sharing API with settings - | path | /Shares/test/sub | - | permissions | read,update,create,delete | - | publicUpload | true | - | password | %public% | - Then the OCS status code should be "403" - And the HTTP status code should be "" - Examples: - | ocs_api_version | http_status_code | - | 1 | 200 | - | 2 | 403 | - - @skipOnReva - Scenario Outline: increasing permissions of a public link of a share with share+read only permissions is not allowed - Given using OCS API version "" - And user "Alice" has created folder "/test" - And user "Alice" has created folder "/test/sub" - And user "Alice" has shared folder "/test" with user "Brian" with permissions "share,read" - And user "Brian" has created a public link share with settings | path | /Shares/test | - | permissions | read | | publicUpload | false | | password | %public% | - When user "Brian" updates the last public link share using the sharing API with - | permissions | read,update,create,delete | - Then the OCS status code should be "403" - And the HTTP status code should be "" - And uploading a file should not work using the new public WebDAV API - Examples: - | ocs_api_version | http_status_code | - | 1 | 200 | - | 2 | 403 | - - @skipOnReva - Scenario Outline: increasing permissions of a public link from a sub-folder of a share with share+read only permissions is not allowed - Given using OCS API version "" - And user "Alice" has created folder "/test" - And user "Alice" has created folder "/test/sub" - And user "Alice" has shared folder "/test" with user "Brian" with permissions "share,read" - And user "Brian" has created a public link share with settings - | path | /Shares/test/sub | - | permissions | read | - | publicUpload | false | - | password | %public% | - And uploading a file should not work using the new public WebDAV API - When user "Brian" updates the last public link share using the sharing API with - | permissions | read,update,create,delete | Then the OCS status code should be "403" And the HTTP status code should be "" - And uploading a file should not work using the new public WebDAV API Examples: | ocs_api_version | http_status_code | | 1 | 200 | diff --git a/tests/acceptance/features/coreApiShareReshareToShares1/reShare.feature b/tests/acceptance/features/coreApiShareReshareToShares1/reShare.feature deleted file mode 100644 index 7084808ac8e..00000000000 --- a/tests/acceptance/features/coreApiShareReshareToShares1/reShare.feature +++ /dev/null @@ -1,283 +0,0 @@ -@issue-1328 @skipOnReva -Feature: sharing - As a user - I want to re-share a resource - So that other users can have access to it - - Background: - Given these users have been created with default attributes and without skeleton files: - | username | - | Alice | - | Brian | - | Carol | - - @smokeTest @skipOnRevaMaster - Scenario Outline: user is not allowed to reshare file when reshare permission is not given - Given using OCS API version "" - And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt" - And user "Alice" has shared file "/textfile0.txt" with user "Brian" with permissions "read,update" - When user "Brian" shares file "/Shares/textfile0.txt" with user "Carol" with permissions "read,update" using the sharing API - Then the OCS status code should be "403" - And the HTTP status code should be "" - And as "Carol" file "/Shares/textfile0.txt" should not exist - And the sharing API should report to user "Carol" that no shares are in the pending state - But as "Brian" file "/Shares/textfile0.txt" should exist - Examples: - | ocs_api_version | http_status_code | - | 1 | 200 | - | 2 | 403 | - - @skipOnRevaMaster - Scenario Outline: user is not allowed to reshare folder when reshare permission is not given - Given using OCS API version "" - And user "Alice" has created folder "/FOLDER" - And user "Alice" has shared folder "/FOLDER" with user "Brian" with permissions "read,update" - When user "Brian" shares folder "/Shares/FOLDER" with user "Carol" with permissions "read,update" using the sharing API - Then the OCS status code should be "403" - And the HTTP status code should be "" - And as "Carol" folder "/Shares/FOLDER" should not exist - And the sharing API should report to user "Carol" that no shares are in the pending state - But as "Brian" folder "/Shares/FOLDER" should exist - Examples: - | ocs_api_version | http_status_code | - | 1 | 200 | - | 2 | 403 | - - @smokeTest - Scenario Outline: user is allowed to reshare file with the same permissions - Given using OCS API version "" - And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt" - And user "Alice" has shared file "/textfile0.txt" with user "Brian" with permissions "share,read" - When user "Brian" shares file "/Shares/textfile0.txt" with user "Carol" with permissions "share,read" using the sharing API - Then the OCS status code should be "" - And the HTTP status code should be "200" - And as "Carol" file "/Shares/textfile0.txt" should exist - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - - Scenario Outline: user is allowed to reshare folder with the same permissions - Given using OCS API version "" - And user "Alice" has created folder "/FOLDER" - And user "Alice" has shared folder "/FOLDER" with user "Brian" with permissions "share,read" - When user "Brian" shares folder "/Shares/FOLDER" with user "Carol" with permissions "share,read" using the sharing API - Then the OCS status code should be "" - And the HTTP status code should be "200" - And as "Carol" folder "/Shares/FOLDER" should exist - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - - Scenario Outline: user is allowed to reshare file with less permissions - Given using OCS API version "" - And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt" - And user "Alice" has shared file "/textfile0.txt" with user "Brian" with permissions "share,update,read" - When user "Brian" shares file "/Shares/textfile0.txt" with user "Carol" with permissions "share,read" using the sharing API - Then the OCS status code should be "" - And the HTTP status code should be "200" - And as "Carol" file "/Shares/textfile0.txt" should exist - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - - Scenario Outline: user is allowed to reshare folder with less permissions - Given using OCS API version "" - And user "Alice" has created folder "/FOLDER" - And user "Alice" has shared folder "/FOLDER" with user "Brian" with permissions "share,update,read" - When user "Brian" shares folder "/Shares/FOLDER" with user "Carol" with permissions "share,read" using the sharing API - Then the OCS status code should be "" - And the HTTP status code should be "200" - And as "Carol" folder "/Shares/FOLDER" should exist - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - @skipOnRevaMaster - Scenario Outline: user is not allowed to reshare file and set more permissions bits - Given using OCS API version "" - And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt" - And user "Alice" has shared file "/textfile0.txt" with user "Brian" with permissions 17 - When user "Brian" shares file "/Shares/textfile0.txt" with user "Carol" with permissions using the sharing API - Then the OCS status code should be "403" - And the HTTP status code should be "" - And as "Carol" file "/Shares/textfile0.txt" should not exist - And the sharing API should report to user "Carol" that no shares are in the pending state - But as "Brian" file "/Shares/textfile0.txt" should exist - Examples: - | ocs_api_version | http_status_code | reshare_permissions | - # passing on more bits including reshare - | 1 | 200 | 19 | - | 2 | 403 | 19 | - | 1 | 200 | 23 | - | 2 | 403 | 23 | - | 1 | 200 | 31 | - | 2 | 403 | 31 | - # passing on more bits but not reshare - | 1 | 200 | 3 | - | 2 | 403 | 3 | - | 1 | 200 | 7 | - | 2 | 403 | 7 | - | 1 | 200 | 15 | - | 2 | 403 | 15 | - - - Scenario Outline: user is allowed to reshare file and set create (4) or delete (8) permissions bits, which get ignored - Given using OCS API version "" - And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt" - And user "Alice" has shared file "/textfile0.txt" with user "Brian" with permissions - When user "Brian" shares file "/Shares/textfile0.txt" with user "Carol" with permissions 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 "Brian" sharing with user "Carol" should include - | share_with | %username% | - | file_target | /Shares/textfile0.txt | - | path | /textfile0.txt | - | permissions | | - | uid_owner | %username% | - And as "Carol" file "/Shares/textfile0.txt" should exist - # The receiver of the reshare can always delete their received share, even though they do not have delete permission - And user "Carol" should be able to delete file "/Shares/textfile0.txt" - # But the upstream sharers will still have the file - But as "Brian" file "/Shares/textfile0.txt" should exist - And as "Alice" file "/textfile0.txt" should exist - Examples: - | ocs_api_version | ocs_status_code | received_permissions | reshare_permissions | granted_permissions | - | 1 | 100 | 19 | 23 | 19 | - | 2 | 200 | 19 | 23 | 19 | - | 1 | 100 | 19 | 31 | 19 | - | 2 | 200 | 19 | 31 | 19 | - | 1 | 100 | 19 | 7 | 3 | - | 2 | 200 | 19 | 7 | 3 | - | 1 | 100 | 19 | 15 | 3 | - | 2 | 200 | 19 | 15 | 3 | - | 1 | 100 | 17 | 21 | 17 | - | 2 | 200 | 17 | 21 | 17 | - | 1 | 100 | 17 | 5 | 1 | - | 2 | 200 | 17 | 5 | 1 | - | 1 | 100 | 17 | 25 | 17 | - | 2 | 200 | 17 | 25 | 17 | - | 1 | 100 | 17 | 9 | 1 | - | 2 | 200 | 17 | 9 | 1 | - - @skipOnRevaMaster - Scenario Outline: user is not allowed to reshare folder and set more permissions bits - Given using OCS API version "" - And user "Alice" has created folder "/PARENT" - And user "Alice" has shared folder "/PARENT" with user "Brian" with permissions - When user "Brian" shares folder "/Shares/PARENT" with user "Carol" with permissions using the sharing API - Then the OCS status code should be "403" - And the HTTP status code should be "" - And as "Carol" folder "/Shares/PARENT" should not exist - And the sharing API should report to user "Carol" that no shares are in the pending state - But as "Brian" folder "/Shares/PARENT" should exist - Examples: - | ocs_api_version | http_status_code | received_permissions | reshare_permissions | - # try to pass on more bits including reshare - | 1 | 200 | 17 | 19 | - | 2 | 403 | 17 | 19 | - | 1 | 200 | 17 | 21 | - | 2 | 403 | 17 | 21 | - | 1 | 200 | 17 | 23 | - | 2 | 403 | 17 | 23 | - | 1 | 200 | 17 | 31 | - | 2 | 403 | 17 | 31 | - | 1 | 200 | 19 | 23 | - | 2 | 403 | 19 | 23 | - | 1 | 200 | 19 | 31 | - | 2 | 403 | 19 | 31 | - # try to pass on more bits but not reshare - | 1 | 200 | 17 | 3 | - | 2 | 403 | 17 | 3 | - | 1 | 200 | 17 | 5 | - | 2 | 403 | 17 | 5 | - | 1 | 200 | 17 | 7 | - | 2 | 403 | 17 | 7 | - | 1 | 200 | 17 | 15 | - | 2 | 403 | 17 | 15 | - | 1 | 200 | 19 | 7 | - | 2 | 403 | 19 | 7 | - | 1 | 200 | 19 | 15 | - | 2 | 403 | 19 | 15 | - - @skipOnRevaMaster - Scenario Outline: user is not allowed to reshare folder and add delete permission bit (8) - Given using OCS API version "" - And user "Alice" has created folder "/PARENT" - And user "Alice" has shared folder "/PARENT" with user "Brian" with permissions - When user "Brian" shares folder "/Shares/PARENT" with user "Carol" with permissions using the sharing API - Then the OCS status code should be "403" - And the HTTP status code should be "" - And as "Carol" folder "/Shares/PARENT" should not exist - And the sharing API should report to user "Carol" that no shares are in the pending state - But as "Brian" folder "/Shares/PARENT" should exist - Examples: - | ocs_api_version | http_status_code | received_permissions | reshare_permissions | - # try to pass on extra delete (including reshare) - | 1 | 200 | 17 | 25 | - | 2 | 403 | 17 | 25 | - | 1 | 200 | 19 | 27 | - | 2 | 403 | 19 | 27 | - | 1 | 200 | 23 | 31 | - | 2 | 403 | 23 | 31 | - # try to pass on extra delete (but not reshare) - | 1 | 200 | 17 | 9 | - | 2 | 403 | 17 | 9 | - | 1 | 200 | 19 | 11 | - | 2 | 403 | 19 | 11 | - | 1 | 200 | 23 | 15 | - | 2 | 403 | 23 | 15 | - - - Scenario Outline: reshare a file with same name as a deleted file - Given using OCS API version "" - And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt" - And user "Alice" has shared file "textfile0.txt" with user "Brian" - And user "Alice" has deleted file "textfile0.txt" - And user "Alice" has uploaded file with content "ownCloud new test text file 0" to "/textfile0.txt" - When user "Alice" shares file "textfile0.txt" with user "Brian" using the sharing API - Then the OCS status code should be "" - And the HTTP status code should be "200" - And the content of file "/Shares/textfile0.txt" for user "Brian" should be "ownCloud new test text file 0" - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - - Scenario Outline: reshare a folder with same name as a deleted folder - Given using OCS API version "" - And user "Alice" has created folder "/PARENT" - And user "Alice" has shared folder "PARENT" with user "Brian" - And user "Alice" has deleted folder "PARENT" - And user "Alice" has created folder "/PARENT" - When user "Alice" shares folder "PARENT" with user "Brian" using the sharing API - Then the OCS status code should be "" - And the HTTP status code should be "200" - And as "Brian" folder "/Shares/PARENT" should exist - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - - Scenario Outline: reshare a folder with same name as a deleted file - Given using OCS API version "" - And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt" - And user "Alice" has shared file "textfile0.txt" with user "Brian" - And user "Alice" has deleted file "/textfile0.txt" - And user "Alice" has created folder "/textfile0.txt" - When user "Alice" shares folder "textfile0.txt" with user "Brian" using the sharing API - Then the OCS status code should be "" - And the HTTP status code should be "200" - And as "Brian" folder "/Shares/textfile0.txt" should exist - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | diff --git a/tests/acceptance/features/coreApiShareReshareToShares1/reShareChain.feature b/tests/acceptance/features/coreApiShareReshareToShares1/reShareChain.feature deleted file mode 100644 index b9524dcf6ce..00000000000 --- a/tests/acceptance/features/coreApiShareReshareToShares1/reShareChain.feature +++ /dev/null @@ -1,22 +0,0 @@ -@issue-2141 @skipOnReva -Feature: resharing can be done on a reshared resource - As a user - I want to re-share a resource - So that other users can have access to it - - - Scenario: reshared files can be still accessed if a user in the middle removes it - Given these users have been created with default attributes and without skeleton files: - | username | - | Alice | - | Brian | - | Carol | - | David | - And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt" - And user "Alice" has shared file "textfile0.txt" with user "Brian" - And user "Brian" has shared file "/Shares/textfile0.txt" with user "Carol" - And user "Carol" has shared file "/Shares/textfile0.txt" with user "David" - When user "Brian" deletes file "/Shares/textfile0.txt" using the WebDAV API - Then the HTTP status code should be "204" - And the content of file "/Shares/textfile0.txt" for user "Carol" should be "ownCloud test text file 0" - And the content of file "/Shares/textfile0.txt" for user "David" should be "ownCloud test text file 0" diff --git a/tests/acceptance/features/coreApiShareReshareToShares1/reShareDisabled.feature b/tests/acceptance/features/coreApiShareReshareToShares1/reShareDisabled.feature deleted file mode 100644 index 06914abb5a6..00000000000 --- a/tests/acceptance/features/coreApiShareReshareToShares1/reShareDisabled.feature +++ /dev/null @@ -1,22 +0,0 @@ -@issue-1328 @skipOnReva -Feature: resharing can be disabled - As a user - I want to share a resource without reshare permission - So that the resource won't be accessible to unwanted individuals - - - Scenario Outline: ordinary sharing is allowed when allow resharing has been disabled - Given these users have been created with default attributes and without skeleton files: - | username | - | Alice | - | Brian | - And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt" - And using OCS API version "" - When user "Alice" shares file "/textfile0.txt" with user "Brian" with permissions "share,update,read" using the sharing API - Then the OCS status code should be "" - And the HTTP status code should be "200" - And as "Brian" file "/Shares/textfile0.txt" should exist - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | diff --git a/tests/acceptance/features/coreApiShareReshareToShares2/reShareSubfolder.feature b/tests/acceptance/features/coreApiShareReshareToShares2/reShareSubfolder.feature deleted file mode 100644 index 3b5b0df2a9a..00000000000 --- a/tests/acceptance/features/coreApiShareReshareToShares2/reShareSubfolder.feature +++ /dev/null @@ -1,135 +0,0 @@ -@issue-1328 @skipOnReva -Feature: a subfolder of a received share can be reshared - As a user - I want to re-share a resource - So that other users can have access to it - - Background: - Given these users have been created with default attributes and without skeleton files: - | username | - | Alice | - | Brian | - | Carol | - And user "Alice" has created folder "/TMP" - And user "Alice" has created folder "/TMP/SUB" - - @smokeTest @issue-2214 - Scenario Outline: user is allowed to reshare a sub-folder with the same permissions - Given using OCS API version "" - And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,read" - When user "Brian" shares folder "/Shares/TMP/SUB" with user "Carol" with permissions "share,read" using the sharing API - Then the OCS status code should be "" - And the HTTP status code should be "200" - And as "Carol" folder "/Shares/SUB" should exist - And as "Brian" folder "/Shares/TMP/SUB" should exist - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - @skipOnRevaMaster - Scenario Outline: user is not allowed to reshare a sub-folder with more permissions - Given using OCS API version "" - And user "Alice" has shared folder "/TMP" with user "Brian" with permissions - When user "Brian" shares folder "/Shares/TMP/SUB" with user "Carol" with permissions using the sharing API - Then the OCS status code should be "403" - And the HTTP status code should be "" - And as "Carol" folder "/Shares/SUB" should not exist - And the sharing API should report to user "Carol" that no shares are in the pending state - And as "Brian" folder "/Shares/TMP/SUB" should exist - Examples: - | ocs_api_version | http_status_code | received_permissions | reshare_permissions | - # try to pass on more bits including reshare - | 1 | 200 | 17 | 19 | - | 2 | 403 | 17 | 19 | - | 1 | 200 | 17 | 21 | - | 2 | 403 | 17 | 21 | - | 1 | 200 | 17 | 23 | - | 2 | 403 | 17 | 23 | - | 1 | 200 | 17 | 31 | - | 2 | 403 | 17 | 31 | - | 1 | 200 | 19 | 23 | - | 2 | 403 | 19 | 23 | - | 1 | 200 | 19 | 31 | - | 2 | 403 | 19 | 31 | - # try to pass on more bits but not reshare - | 1 | 200 | 17 | 3 | - | 2 | 403 | 17 | 3 | - | 1 | 200 | 17 | 5 | - | 2 | 403 | 17 | 5 | - | 1 | 200 | 17 | 7 | - | 2 | 403 | 17 | 7 | - | 1 | 200 | 17 | 15 | - | 2 | 403 | 17 | 15 | - | 1 | 200 | 19 | 7 | - | 2 | 403 | 19 | 7 | - | 1 | 200 | 19 | 15 | - | 2 | 403 | 19 | 15 | - # try to pass on extra delete (including reshare) - | 1 | 200 | 17 | 25 | - | 2 | 403 | 17 | 25 | - | 1 | 200 | 19 | 27 | - | 2 | 403 | 19 | 27 | - | 1 | 200 | 23 | 31 | - | 2 | 403 | 23 | 31 | - # try to pass on extra delete (but not reshare) - | 1 | 200 | 17 | 9 | - | 2 | 403 | 17 | 9 | - | 1 | 200 | 19 | 11 | - | 2 | 403 | 19 | 11 | - | 1 | 200 | 23 | 15 | - | 2 | 403 | 23 | 15 | - - @issue-2214 - Scenario Outline: user is allowed to update reshare of a sub-folder with less permissions - Given using OCS API version "" - And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,create,update,read" - And user "Brian" has shared folder "/Shares/TMP/SUB" with user "Carol" with permissions "share,create,update,read" - When user "Brian" updates the last share using the sharing API with - | permissions | share,read | - Then the OCS status code should be "" - And the HTTP status code should be "200" - And as "Carol" folder "/Shares/SUB" should exist - But user "Carol" should not be able to upload file "filesForUpload/textfile.txt" to "/Shares/SUB/textfile.txt" - And as "Brian" folder "/Shares/TMP/SUB" should exist - And user "Brian" should be able to upload file "filesForUpload/textfile.txt" to "/Shares/TMP/SUB/textfile.txt" - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - @issue-2214 - Scenario Outline: user is allowed to update reshare of a sub-folder to the maximum allowed permissions - Given using OCS API version "" - And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,create,update,read" - And user "Brian" has shared folder "/Shares/TMP/SUB" with user "Carol" with permissions "share,read" - When user "Brian" updates the last share using the sharing API with - | permissions | share,create,update,read | - Then the OCS status code should be "" - And the HTTP status code should be "200" - And as "Carol" folder "/Shares/SUB" should exist - And user "Carol" should be able to upload file "filesForUpload/textfile.txt" to "/Shares/SUB/textfile.txt" - And as "Brian" folder "/Shares/TMP/SUB" should exist - And user "Brian" should be able to upload file "filesForUpload/textfile.txt" to "/Shares/TMP/SUB/textfile.txt" - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - @issue-2214 @skipOnRevaMaster - Scenario Outline: user is not allowed to update reshare of a sub-folder with more permissions - Given using OCS API version "" - And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,read" - And user "Brian" has shared folder "/Shares/TMP/SUB" with user "Carol" with permissions "share,read" - When user "Brian" updates the last share using the sharing API with - | permissions | all | - Then the OCS status code should be "403" - And the HTTP status code should be "" - And as "Carol" folder "/Shares/SUB" should exist - But user "Carol" should not be able to upload file "filesForUpload/textfile.txt" to "/Shares/SUB/textfile.txt" - And as "Brian" folder "/Shares/TMP/SUB" should exist - But user "Brian" should not be able to upload file "filesForUpload/textfile.txt" to "/Shares/TMP/SUB/textfile.txt" - Examples: - | ocs_api_version | http_status_code | - | 1 | 200 | - | 2 | 403 | diff --git a/tests/acceptance/features/coreApiShareReshareToShares2/reShareUpdate.feature b/tests/acceptance/features/coreApiShareReshareToShares2/reShareUpdate.feature deleted file mode 100644 index c65b421a5e2..00000000000 --- a/tests/acceptance/features/coreApiShareReshareToShares2/reShareUpdate.feature +++ /dev/null @@ -1,138 +0,0 @@ -@issue-1328 @skipOnReva -Feature: sharing - As a user - I want to update share permissions - So that I can decide what resources can be shared with which permission - - Background: - Given these users have been created with default attributes and without skeleton files: - | username | - | Alice | - | Brian | - | Carol | - And user "Alice" has created folder "/TMP" - - - Scenario Outline: update of reshare can reduce permissions - Given using OCS API version "" - And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,create,update,read" - And user "Brian" has shared folder "Shares/TMP" with user "Carol" with permissions "share,create,update,read" - When user "Brian" updates the last share using the sharing API with - | permissions | share,read | - Then the OCS status code should be "" - And the HTTP status code should be "200" - And user "Carol" should not be able to upload file "filesForUpload/textfile.txt" to "Shares/TMP/textfile.txt" - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - - Scenario Outline: update of reshare can increase permissions to the maximum allowed - Given using OCS API version "" - And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,create,update,read" - And user "Brian" has shared folder "Shares/TMP" with user "Carol" with permissions "share,read" - When user "Brian" updates the last share using the sharing API with - | permissions | share,create,update,read | - Then the OCS status code should be "" - And the HTTP status code should be "200" - And user "Carol" should be able to upload file "filesForUpload/textfile.txt" to "Shares/TMP/textfile.txt" - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - @skipOnRevaMaster - Scenario Outline: do not allow update of reshare to exceed permissions - Given using OCS API version "" - And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,read" - And user "Brian" has shared folder "Shares/TMP" with user "Carol" with permissions "share,read" - When user "Brian" updates the last share using the sharing API with - | permissions | all | - Then the OCS status code should be "403" - And the HTTP status code should be "" - And user "Carol" should not be able to upload file "filesForUpload/textfile.txt" to "Shares/TMP/textfile.txt" - Examples: - | ocs_api_version | http_status_code | - | 1 | 200 | - | 2 | 403 | - - - Scenario Outline: update of user reshare by the original share owner can increase permissions up to the permissions of the top-level share - Given using OCS API version "" - And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,create,update,read" - And user "Brian" has shared folder "Shares/TMP" with user "Carol" with permissions "share,read" - When user "Alice" updates the last share using the sharing API with - | permissions | share,create,update,read | - Then the OCS status code should be "" - And the HTTP status code should be "200" - And user "Carol" should be able to upload file "filesForUpload/textfile.txt" to "Shares/TMP/textfile.txt" - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - - Scenario Outline: update of user reshare by the original share owner can increase permissions to more than the permissions of the top-level share - Given using OCS API version "" - And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,update,read" - And user "Brian" has shared folder "Shares/TMP" with user "Carol" with permissions "share,read" - When user "Alice" updates the last share using the sharing API with - | permissions | share,create,update,read | - Then the OCS status code should be "" - And the HTTP status code should be "200" - And user "Carol" should be able to upload file "filesForUpload/textfile.txt" to "Shares/TMP/textfile.txt" - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - - Scenario Outline: update of group reshare by the original share owner can increase permissions up to permissions of the top-level share - Given using OCS API version "" - And group "grp1" has been created - And user "Carol" has been added to group "grp1" - And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,create,update,read" - And user "Brian" has shared folder "Shares/TMP" with group "grp1" with permissions "share,read" - When user "Alice" updates the last share using the sharing API with - | permissions | share,create,update,read | - Then the OCS status code should be "" - And the HTTP status code should be "200" - And user "Carol" should be able to upload file "filesForUpload/textfile.txt" to "Shares/TMP/textfile.txt" - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - - Scenario Outline: update of group reshare by the original share owner can increase permissions to more than the permissions of the top-level share - Given using OCS API version "" - And group "grp1" has been created - And user "Carol" has been added to group "grp1" - And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,update,read" - And user "Brian" has shared folder "Shares/TMP" with group "grp1" with permissions "share,read" - When user "Alice" updates the last share using the sharing API with - | permissions | share,create,update,read | - Then the OCS status code should be "" - And the HTTP status code should be "200" - And user "Carol" should be able to upload file "filesForUpload/textfile.txt" to "Shares/TMP/textfile.txt" - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - - Scenario Outline: after losing share permissions user can still delete a previously reshared share - Given using OCS API version "" - And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,create,update,read" - And user "Brian" has shared folder "Shares/TMP" with user "Carol" with permissions "share,create,update,read" - And user "Alice" has updated the last share of "Alice" with - | permissions | create,update,read | - When user "Brian" deletes the last share using the sharing API - Then the OCS status code should be "" - And the HTTP status code should be "200" - And user "Carol" should not have any received shares - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | diff --git a/tests/acceptance/features/coreApiShareReshareToShares2/reShareWithExpiryDate.feature b/tests/acceptance/features/coreApiShareReshareToShares2/reShareWithExpiryDate.feature deleted file mode 100644 index 526b6a89bbf..00000000000 --- a/tests/acceptance/features/coreApiShareReshareToShares2/reShareWithExpiryDate.feature +++ /dev/null @@ -1,77 +0,0 @@ -@issue-1328 @skipOnReva -Feature: resharing a resource with an expiration date - As a user - I want to reshare resources with expiration date - So that other users will have access to the resources only for a limited amount of time - - Background: - Given these users have been created with default attributes and without skeleton files: - | username | - | Alice | - | Brian | - And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt" - And user "Carol" has been created with default attributes and without skeleton files - - - Scenario Outline: user should be able to set expiration while resharing a file with user - Given using OCS API version "" - And user "Alice" has shared file "/textfile0.txt" with user "Brian" with permissions "read,update,share" - When user "Brian" creates a share using the sharing API with settings - | path | /Shares/textfile0.txt | - | shareType | user | - | permissions | change | - | shareWith | Carol | - | expireDate | +3 days | - Then the HTTP status code should be "200" - And the OCS status code should be "" - And the information of the last share of user "Brian" should include - | expiration | +3 days | - And the response when user "Carol" gets the info of the last share should include - | expiration | +3 days | - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - @issue-1289 - Scenario Outline: user should be able to set expiration while resharing a file with group - Given using OCS API version "" - And group "grp1" has been created - And user "Carol" has been added to group "grp1" - And user "Alice" has shared file "/textfile0.txt" with user "Brian" with permissions "read,update,share" - When user "Brian" creates a share using the sharing API with settings - | path | /Shares/textfile0.txt | - | shareType | group | - | permissions | change | - | shareWith | grp1 | - | expireDate | +3 days | - Then the HTTP status code should be "200" - And the OCS status code should be "" - And the information of the last share of user "Brian" should include - | expiration | +3 days | - And the response when user "Carol" gets the info of the last share should include - | expiration | +3 days | - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | - - - Scenario Outline: resharing using the sharing API with default expire date set but not enforced - Given using OCS API version "" - And user "Alice" has shared file "/textfile0.txt" with user "Brian" with permissions "read,update,share" - When user "Brian" creates a share using the sharing API with settings - | path | /Shares/textfile0.txt | - | shareType | user | - | permissions | change | - | shareWith | Carol | - Then the HTTP status code should be "200" - And the OCS status code should be "" - And the information of the last share of user "Brian" should include - | expiration | | - And the response when user "Carol" gets the info of the last share should include - | expiration | | - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 |