@@ -180,3 +180,110 @@ Scenario: publicUpload overrides permissions
180180      | uid_file_owner  | user0  | 
181181      | share_type      |     3  | 
182182      | permissions     |     1  | 
183+ 
184+ Scenario : Cannot copy files from share without share permission into other share 
185+     Given  user "user0"  exists
186+     Given  user "user1"  exists
187+     Given  user "user2"  exists
188+     And  As an "user0" 
189+     And  user "user0"  created a folder "/share" 
190+     When  creating a share with
191+       | path         | share  | 
192+       | shareType    |     0  | 
193+       | shareWith    | user1  | 
194+       | permissions  |    15  | 
195+     Then  the HTTP status code should be "200" 
196+     And  the OCS status code should be "100" 
197+     And  User "user0"  uploads file with content "test"  to "/share/test.txt" 
198+     And  As an "user1" 
199+     And  user "user1"  created a folder "/re-share" 
200+     When  creating a share with
201+       | path         | re -share  | 
202+       | shareType    |        0  | 
203+       | shareWith    |    user2  | 
204+       | permissions  |       31  | 
205+     Then  the HTTP status code should be "200" 
206+     And  the OCS status code should be "100" 
207+     When  User "user1"  copies file "/share/test.txt"  to "/re-share/copytest.txt" 
208+     Then  the HTTP status code should be "403" 
209+ 
210+ Scenario : Cannot move files from share without share permission into other share 
211+     Given  user "user0"  exists
212+     Given  user "user1"  exists
213+     Given  user "user2"  exists
214+     And  As an "user0" 
215+     And  user "user0"  created a folder "/share" 
216+     When  creating a share with
217+       | path         | share  | 
218+       | shareType    |     0  | 
219+       | shareWith    | user1  | 
220+       | permissions  |    15  | 
221+     Then  the HTTP status code should be "200" 
222+     And  the OCS status code should be "100" 
223+     And  User "user0"  uploads file with content "test"  to "/share/test.txt" 
224+     And  As an "user1" 
225+     And  user "user1"  created a folder "/re-share" 
226+     When  creating a share with
227+       | path         | re -share  | 
228+       | shareType    |        0  | 
229+       | shareWith    |    user2  | 
230+       | permissions  |       31  | 
231+     Then  the HTTP status code should be "200" 
232+     And  the OCS status code should be "100" 
233+     When  User "user1"  moves file "/share/test.txt"  to "/re-share/movetest.txt" 
234+     Then  the HTTP status code should be "403" 
235+ 
236+ Scenario : Cannot move folder containing share without share permission into other share 
237+     Given  user "user0"  exists
238+     Given  user "user1"  exists
239+     Given  user "user2"  exists
240+     And  As an "user0" 
241+     And  user "user0"  created a folder "/share" 
242+     When  creating a share with
243+       | path         | share  | 
244+       | shareType    |     0  | 
245+       | shareWith    | user1  | 
246+       | permissions  |    15  | 
247+     Then  the HTTP status code should be "200" 
248+     And  the OCS status code should be "100" 
249+     And  User "user0"  uploads file with content "test"  to "/share/test.txt" 
250+     And  As an "user1" 
251+     And  user "user1"  created a folder "/contains-share" 
252+     When  User "user1"  moves file "/share"  to "/contains-share/share" 
253+     Then  the HTTP status code should be "201" 
254+     And  user "user1"  created a folder "/re-share" 
255+     When  creating a share with
256+       | path         | re -share  | 
257+       | shareType    |        0  | 
258+       | shareWith    |    user2  | 
259+       | permissions  |       31  | 
260+     Then  the HTTP status code should be "200" 
261+     And  the OCS status code should be "100" 
262+     When  User "user1"  moves file "/contains-share"  to "/re-share/movetest" 
263+     Then  the HTTP status code should be "403" 
264+ 
265+ Scenario : Can copy file between shares if share permissions 
266+     Given  user "user0"  exists
267+     Given  user "user1"  exists
268+     Given  user "user2"  exists
269+     And  As an "user0" 
270+     And  user "user0"  created a folder "/share" 
271+     When  creating a share with
272+       | path         | share  | 
273+       | shareType    |     0  | 
274+       | shareWith    | user1  | 
275+       | permissions  |    31  | 
276+     Then  the HTTP status code should be "200" 
277+     And  the OCS status code should be "100" 
278+     And  User "user0"  uploads file with content "test"  to "/share/test.txt" 
279+     And  As an "user1" 
280+     And  user "user1"  created a folder "/re-share" 
281+     When  creating a share with
282+       | path         | re -share  | 
283+       | shareType    |        0  | 
284+       | shareWith    |    user2  | 
285+       | permissions  |       31  | 
286+     Then  the HTTP status code should be "200" 
287+     And  the OCS status code should be "100" 
288+     When  User "user1"  copies file "/share/test.txt"  to "/re-share/movetest.txt" 
289+     Then  the HTTP status code should be "201" 
0 commit comments