@@ -289,3 +289,114 @@ Scenario: Can copy file between shares if share permissions
289289 And the OCS status code should be "100"
290290 When User "user1" copies file "/share/test.txt" to "/re-share/movetest.txt"
291291 Then the HTTP status code should be "201"
292+
293+ Scenario : Cannot copy files from share without share permission into subfolder of other share
294+ Given user "user0" exists
295+ Given user "user1" exists
296+ Given user "user2" exists
297+ And As an "user0"
298+ And user "user0" created a folder "/share"
299+ When creating a share with
300+ | path | share |
301+ | shareType | 0 |
302+ | shareWith | user1 |
303+ | permissions | 7 |
304+ Then the HTTP status code should be "200"
305+ And the OCS status code should be "100"
306+ And User "user0" uploads file with content "test" to "/share/test.txt"
307+ And As an "user1"
308+ And user "user1" created a folder "/re-share"
309+ And user "user1" created a folder "/re-share/subfolder"
310+ When creating a share with
311+ | path | re -share |
312+ | shareType | 0 |
313+ | shareWith | user2 |
314+ | permissions | 31 |
315+ Then the HTTP status code should be "200"
316+ And the OCS status code should be "100"
317+ When User "user1" copies file "/share/test.txt" to "/re-share/subfolder/copytest.txt"
318+ Then the HTTP status code should be "403"
319+
320+ Scenario : Cannot move files from share without share permission into subfolder of other share
321+ Given user "user0" exists
322+ Given user "user1" exists
323+ Given user "user2" exists
324+ And As an "user0"
325+ And user "user0" created a folder "/share"
326+ When creating a share with
327+ | path | share |
328+ | shareType | 0 |
329+ | shareWith | user1 |
330+ | permissions | 7 |
331+ Then the HTTP status code should be "200"
332+ And the OCS status code should be "100"
333+ And User "user0" uploads file with content "test" to "/share/test.txt"
334+ And As an "user1"
335+ And user "user1" created a folder "/re-share"
336+ And user "user1" created a folder "/re-share/subfolder"
337+ When creating a share with
338+ | path | re -share |
339+ | shareType | 0 |
340+ | shareWith | user2 |
341+ | permissions | 31 |
342+ Then the HTTP status code should be "200"
343+ And the OCS status code should be "100"
344+ When User "user1" moves file "/share/test.txt" to "/re-share/subfolder/movetest.txt"
345+ Then the HTTP status code should be "403"
346+
347+ Scenario : Cannot move folder containing share without share permission into subfolder of other share
348+ Given user "user0" exists
349+ Given user "user1" exists
350+ Given user "user2" exists
351+ And As an "user0"
352+ And user "user0" created a folder "/share"
353+ When creating a share with
354+ | path | share |
355+ | shareType | 0 |
356+ | shareWith | user1 |
357+ | permissions | 7 |
358+ Then the HTTP status code should be "200"
359+ And the OCS status code should be "100"
360+ And User "user0" uploads file with content "test" to "/share/test.txt"
361+ And As an "user1"
362+ And user "user1" created a folder "/contains-share"
363+ When User "user1" moves file "/share" to "/contains-share/share"
364+ Then the HTTP status code should be "201"
365+ And user "user1" created a folder "/re-share"
366+ And user "user1" created a folder "/re-share/subfolder"
367+ When creating a share with
368+ | path | re -share |
369+ | shareType | 0 |
370+ | shareWith | user2 |
371+ | permissions | 31 |
372+ Then the HTTP status code should be "200"
373+ And the OCS status code should be "100"
374+ When User "user1" moves file "/contains-share" to "/re-share/subfolder/movetest"
375+ Then the HTTP status code should be "403"
376+
377+ Scenario : Can copy file between shares into subfolder if share permissions
378+ Given user "user0" exists
379+ Given user "user1" exists
380+ Given user "user2" exists
381+ And As an "user0"
382+ And user "user0" created a folder "/share"
383+ When creating a share with
384+ | path | share |
385+ | shareType | 0 |
386+ | shareWith | user1 |
387+ | permissions | 31 |
388+ Then the HTTP status code should be "200"
389+ And the OCS status code should be "100"
390+ And User "user0" uploads file with content "test" to "/share/test.txt"
391+ And As an "user1"
392+ And user "user1" created a folder "/re-share"
393+ And user "user1" created a folder "/re-share/subfolder"
394+ When creating a share with
395+ | path | re -share |
396+ | shareType | 0 |
397+ | shareWith | user2 |
398+ | permissions | 31 |
399+ Then the HTTP status code should be "200"
400+ And the OCS status code should be "100"
401+ When User "user1" copies file "/share/test.txt" to "/re-share/subfolder/copytest.txt"
402+ Then the HTTP status code should be "201"
0 commit comments