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>
This commit is contained in:
Daniel Calviño Sánchez 2019-06-21 12:22:21 +02:00 committed by Backportbot
parent 9bb690d299
commit 824c57d508
2 changed files with 43 additions and 0 deletions

View file

@ -417,6 +417,28 @@ Feature: sharing
| permissions | 31 | | permissions | 31 |
Then the OCS status code should be "404" 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 Scenario: Only allow 1 link share per file/folder
Given user "user0" exists Given user "user0" exists
And As an "user0" And As an "user0"

View file

@ -357,6 +357,27 @@ Feature: sharing
Then the OCS status code should be "404" Then the OCS status code should be "404"
And the HTTP status code should be "200" 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 Scenario: deleting file out of a share as recipient creates a backup for the owner
Given As an "admin" Given As an "admin"
And user "user0" exists And user "user0" exists