@@ -231,6 +231,34 @@ Feature: sharing
231231 Then the OCS status code should be "404"
232232 And the HTTP status code should be "200"
233233
234+ Scenario : User is allowed to reshare file with more permissions if shares of same file to same user have them
235+ Given user "user0" exists
236+ And user "user1" exists
237+ And user "user2" exists
238+ And group "group1" exists
239+ And user "user1" belongs to group "group1"
240+ And As an "user0"
241+ And creating a share with
242+ | path | /textfile0 .txt |
243+ | shareType | 1 |
244+ | shareWith | group1 |
245+ | permissions | 15 |
246+ And As an "user1"
247+ And As an "user0"
248+ And creating a share with
249+ | path | /textfile0 .txt |
250+ | shareType | 0 |
251+ | shareWith | user1 |
252+ | permissions | 17 |
253+ And As an "user1"
254+ When creating a share with
255+ | path | /textfile0 (2 ).txt |
256+ | shareType | 0 |
257+ | shareWith | user2 |
258+ | permissions | 19 |
259+ Then the OCS status code should be "100"
260+ And the HTTP status code should be "200"
261+
234262 Scenario : User is not allowed to reshare file with more permissions
235263 As an "admin"
236264 Given user "user0" exists
@@ -251,6 +279,86 @@ Feature: sharing
251279 Then the OCS status code should be "404"
252280 And the HTTP status code should be "200"
253281
282+ Scenario : User is not allowed to reshare file with more permissions even if shares of same file to other users have them
283+ Given user "user0" exists
284+ And user "user1" exists
285+ And user "user2" exists
286+ And user "user3" exists
287+ And As an "user0"
288+ And creating a share with
289+ | path | /textfile0 .txt |
290+ | shareType | 0 |
291+ | shareWith | user3 |
292+ | permissions | 15 |
293+ And As an "user3"
294+ And As an "user0"
295+ And creating a share with
296+ | path | /textfile0 .txt |
297+ | shareType | 0 |
298+ | shareWith | user1 |
299+ | permissions | 17 |
300+ And As an "user1"
301+ When creating a share with
302+ | path | /textfile0 (2 ).txt |
303+ | shareType | 0 |
304+ | shareWith | user2 |
305+ | permissions | 19 |
306+ Then the OCS status code should be "404"
307+ And the HTTP status code should be "200"
308+
309+ Scenario : User is not allowed to reshare file with more permissions even if shares of other files from same user have them
310+ Given user "user0" exists
311+ And user "user1" exists
312+ And user "user2" exists
313+ And As an "user0"
314+ And creating a share with
315+ | path | /textfile0 .txt |
316+ | shareType | 0 |
317+ | shareWith | user1 |
318+ | permissions | 15 |
319+ And As an "user1"
320+ And As an "user0"
321+ And creating a share with
322+ | path | /textfile1 .txt |
323+ | shareType | 0 |
324+ | shareWith | user1 |
325+ | permissions | 17 |
326+ And As an "user1"
327+ When creating a share with
328+ | path | /textfile1 (2 ).txt |
329+ | shareType | 0 |
330+ | shareWith | user2 |
331+ | permissions | 19 |
332+ Then the OCS status code should be "404"
333+ And the HTTP status code should be "200"
334+
335+ Scenario : User is not allowed to reshare file with more permissions even if shares of other files from other users have them
336+ Given user "user0" exists
337+ And user "user1" exists
338+ And user "user2" exists
339+ And user "user3" exists
340+ And As an "user3"
341+ And creating a share with
342+ | path | /textfile0 .txt |
343+ | shareType | 0 |
344+ | shareWith | user1 |
345+ | permissions | 15 |
346+ And As an "user1"
347+ And As an "user0"
348+ And creating a share with
349+ | path | /textfile1 .txt |
350+ | shareType | 0 |
351+ | shareWith | user1 |
352+ | permissions | 17 |
353+ And As an "user1"
354+ When creating a share with
355+ | path | /textfile1 (2 ).txt |
356+ | shareType | 0 |
357+ | shareWith | user2 |
358+ | permissions | 19 |
359+ Then the OCS status code should be "404"
360+ And the HTTP status code should be "200"
361+
254362 Scenario : User is not allowed to reshare file with additional delete permissions
255363 As an "admin"
256364 Given user "user0" exists
@@ -456,6 +564,37 @@ Feature: sharing
456564 | permissions | 1 |
457565 Then the OCS status code should be "100"
458566
567+ Scenario : Allow reshare to exceed permissions if shares of same file to same user have them
568+ Given user "user0" exists
569+ And user "user1" exists
570+ And user "user2" exists
571+ And group "group1" exists
572+ And user "user1" belongs to group "group1"
573+ And user "user0" created a folder "/TMP"
574+ And As an "user0"
575+ And creating a share with
576+ | path | /TMP |
577+ | shareType | 1 |
578+ | shareWith | group1 |
579+ | permissions | 15 |
580+ And As an "user1"
581+ And As an "user0"
582+ And creating a share with
583+ | path | /TMP |
584+ | shareType | 0 |
585+ | shareWith | user1 |
586+ | permissions | 17 |
587+ And As an "user1"
588+ And creating a share with
589+ | path | /TMP |
590+ | shareType | 0 |
591+ | shareWith | user2 |
592+ | permissions | 17 |
593+ When Updating last share with
594+ | permissions | 31 |
595+ Then the OCS status code should be "100"
596+ And the HTTP status code should be "200"
597+
459598 Scenario : Do not allow reshare to exceed permissions
460599 Given user "user0" exists
461600 And user "user1" exists
@@ -477,6 +616,95 @@ Feature: sharing
477616 | permissions | 31 |
478617 Then the OCS status code should be "404"
479618
619+ Scenario : Do not allow reshare to exceed permissions even if shares of same file to other users have them
620+ Given user "user0" exists
621+ And user "user1" exists
622+ And user "user2" exists
623+ And user "user3" exists
624+ And user "user0" created a folder "/TMP"
625+ And As an "user0"
626+ And creating a share with
627+ | path | /TMP |
628+ | shareType | 0 |
629+ | shareWith | user3 |
630+ | permissions | 15 |
631+ And As an "user3"
632+ And As an "user0"
633+ And creating a share with
634+ | path | /TMP |
635+ | shareType | 0 |
636+ | shareWith | user1 |
637+ | permissions | 21 |
638+ And As an "user1"
639+ And creating a share with
640+ | path | /TMP |
641+ | shareType | 0 |
642+ | shareWith | user2 |
643+ | permissions | 21 |
644+ When Updating last share with
645+ | permissions | 31 |
646+ Then the OCS status code should be "404"
647+ And the HTTP status code should be "200"
648+
649+ Scenario : Do not allow reshare to exceed permissions even if shares of other files from same user have them
650+ Given user "user0" exists
651+ And user "user1" exists
652+ And user "user2" exists
653+ And As an "user0"
654+ And creating a share with
655+ | path | /FOLDER |
656+ | shareType | 0 |
657+ | shareWith | user1 |
658+ | permissions | 15 |
659+ And As an "user1"
660+ And user "user0" created a folder "/TMP"
661+ And As an "user0"
662+ And creating a share with
663+ | path | /TMP |
664+ | shareType | 0 |
665+ | shareWith | user1 |
666+ | permissions | 21 |
667+ And As an "user1"
668+ And creating a share with
669+ | path | /TMP |
670+ | shareType | 0 |
671+ | shareWith | user2 |
672+ | permissions | 21 |
673+ When Updating last share with
674+ | permissions | 31 |
675+ Then the OCS status code should be "404"
676+ And the HTTP status code should be "200"
677+
678+ Scenario : Do not allow reshare to exceed permissions even if shares of other files from other users have them
679+ Given user "user0" exists
680+ And user "user1" exists
681+ And user "user2" exists
682+ And user "user3" exists
683+ And As an "user3"
684+ And creating a share with
685+ | path | /FOLDER |
686+ | shareType | 0 |
687+ | shareWith | user1 |
688+ | permissions | 15 |
689+ And As an "user1"
690+ And user "user0" created a folder "/TMP"
691+ And As an "user0"
692+ And creating a share with
693+ | path | /TMP |
694+ | shareType | 0 |
695+ | shareWith | user1 |
696+ | permissions | 21 |
697+ And As an "user1"
698+ And creating a share with
699+ | path | /TMP |
700+ | shareType | 0 |
701+ | shareWith | user2 |
702+ | permissions | 21 |
703+ When Updating last share with
704+ | permissions | 31 |
705+ Then the OCS status code should be "404"
706+ And the HTTP status code should be "200"
707+
480708 Scenario : Do not allow sub reshare to exceed permissions
481709 Given user "user0" exists
482710 And user "user1" exists
0 commit comments