Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2019-06-21 13:22:21 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-06-28 10:49:26 +0300
commit9f6b9b44df6917c6fa175c4302328ccfff6895e4 (patch)
tree168075d7f48e7a32c0f0793bbc3d70f0935ee57b /build
parentd3301befa05c3441a1f4f81e17b1f36bf8f5d84d (diff)
Add integration test for increasing sub reshare permissions
The tests check an user share and a link share; there is a slight difference in style between them as each one is based on the test above it, which tests increasing reshare permissions. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/sharing-v1-part2.feature22
-rw-r--r--build/integration/features/sharing-v1-part3.feature21
2 files changed, 43 insertions, 0 deletions
diff --git a/build/integration/features/sharing-v1-part2.feature b/build/integration/features/sharing-v1-part2.feature
index e90d44d1a61..f6532ea564d 100644
--- a/build/integration/features/sharing-v1-part2.feature
+++ b/build/integration/features/sharing-v1-part2.feature
@@ -417,6 +417,28 @@ Feature: sharing
| permissions | 31 |
Then the OCS status code should be "404"
+ Scenario: Do not allow sub reshare to exceed permissions
+ Given user "user0" exists
+ And user "user1" exists
+ And user "user2" exists
+ And user "user0" created a folder "/TMP"
+ And user "user0" created a folder "/TMP/SUB"
+ And As an "user0"
+ And creating a share with
+ | path | /TMP |
+ | shareType | 0 |
+ | shareWith | user1 |
+ | permissions | 21 |
+ And As an "user1"
+ And creating a share with
+ | path | /TMP/SUB |
+ | shareType | 0 |
+ | shareWith | user2 |
+ | permissions | 21 |
+ When Updating last share with
+ | permissions | 31 |
+ Then the OCS status code should be "404"
+
Scenario: Only allow 1 link share per file/folder
Given user "user0" exists
And As an "user0"
diff --git a/build/integration/features/sharing-v1-part3.feature b/build/integration/features/sharing-v1-part3.feature
index 9ef57682534..db31107964e 100644
--- a/build/integration/features/sharing-v1-part3.feature
+++ b/build/integration/features/sharing-v1-part3.feature
@@ -357,6 +357,27 @@ Feature: sharing
Then the OCS status code should be "404"
And the HTTP status code should be "200"
+ Scenario: do not allow to increase link share permissions on sub reshare
+ Given As an "admin"
+ And user "user0" exists
+ And user "user1" exists
+ And user "user0" created a folder "/TMP"
+ And user "user0" created a folder "/TMP/SUB"
+ And As an "user0"
+ And creating a share with
+ | path | TMP |
+ | shareType | 0 |
+ | shareWith | user1 |
+ | permissions | 17 |
+ When As an "user1"
+ And creating a share with
+ | path | TMP/SUB |
+ | shareType | 3 |
+ And Updating last share with
+ | publicUpload | true |
+ Then the OCS status code should be "404"
+ And the HTTP status code should be "200"
+
Scenario: deleting file out of a share as recipient creates a backup for the owner
Given As an "admin"
And user "user0" exists