Skip to content

Commit 23f84fd

Browse files
committed
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>
1 parent 520fca3 commit 23f84fd

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

build/integration/features/sharing-v1-part2.feature

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,28 @@ Feature: sharing
417417
| permissions | 31 |
418418
Then the OCS status code should be "404"
419419

420+
Scenario: Do not allow sub reshare to exceed permissions
421+
Given user "user0" exists
422+
And user "user1" exists
423+
And user "user2" exists
424+
And user "user0" created a folder "/TMP"
425+
And user "user0" created a folder "/TMP/SUB"
426+
And As an "user0"
427+
And creating a share with
428+
| path | /TMP |
429+
| shareType | 0 |
430+
| shareWith | user1 |
431+
| permissions | 21 |
432+
And As an "user1"
433+
And creating a share with
434+
| path | /TMP/SUB |
435+
| shareType | 0 |
436+
| shareWith | user2 |
437+
| permissions | 21 |
438+
When Updating last share with
439+
| permissions | 31 |
440+
Then the OCS status code should be "404"
441+
420442
Scenario: Only allow 1 link share per file/folder
421443
Given user "user0" exists
422444
And As an "user0"

build/integration/features/sharing-v1-part3.feature

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,27 @@ Feature: sharing
357357
Then the OCS status code should be "404"
358358
And the HTTP status code should be "200"
359359

360+
Scenario: do not allow to increase link share permissions on sub reshare
361+
Given As an "admin"
362+
And user "user0" exists
363+
And user "user1" exists
364+
And user "user0" created a folder "/TMP"
365+
And user "user0" created a folder "/TMP/SUB"
366+
And As an "user0"
367+
And creating a share with
368+
| path | TMP |
369+
| shareType | 0 |
370+
| shareWith | user1 |
371+
| permissions | 17 |
372+
When As an "user1"
373+
And creating a share with
374+
| path | TMP/SUB |
375+
| shareType | 3 |
376+
And Updating last share with
377+
| publicUpload | true |
378+
Then the OCS status code should be "404"
379+
And the HTTP status code should be "200"
380+
360381
Scenario: deleting file out of a share as recipient creates a backup for the owner
361382
Given As an "admin"
362383
And user "user0" exists

0 commit comments

Comments
 (0)