1
0

sharing-v1-part2.feature 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212
  1. # SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
  2. # SPDX-License-Identifier: AGPL-3.0-or-later
  3. Feature: sharing
  4. Background:
  5. Given using api version "1"
  6. Given using old dav path
  7. # See sharing-v1.feature
  8. Scenario: getting all shares of a file with reshares
  9. Given user "user0" exists
  10. And user "user1" exists
  11. And user "user2" exists
  12. And user "user3" exists
  13. And file "textfile0.txt" of user "user0" is shared with user "user1"
  14. And user "user1" accepts last share
  15. And file "textfile0 (2).txt" of user "user1" is shared with user "user2"
  16. And As an "user0"
  17. When sending "GET" to "/apps/files_sharing/api/v1/shares?reshares=true&path=textfile0.txt"
  18. Then the OCS status code should be "100"
  19. And the HTTP status code should be "200"
  20. And User "user1" should be included in the response
  21. And User "user2" should be included in the response
  22. And User "user3" should not be included in the response
  23. Scenario: getting all shares of a file with a received share after revoking the resharing rights
  24. Given user "user0" exists
  25. And user "user1" exists
  26. And user "user2" exists
  27. And file "textfile0.txt" of user "user1" is shared with user "user0"
  28. And user "user0" accepts last share
  29. And Updating last share with
  30. | permissions | 1 |
  31. And file "textfile0.txt" of user "user1" is shared with user "user2"
  32. When As an "user0"
  33. And sending "GET" to "/apps/files_sharing/api/v1/shares?reshares=true&path=/textfile0 (2).txt"
  34. Then the list of returned shares has 1 shares
  35. And share 0 is returned with
  36. | share_type | 0 |
  37. | uid_owner | user1 |
  38. | displayname_owner | user1 |
  39. | path | /textfile0 (2).txt |
  40. | item_type | file |
  41. | mimetype | text/plain |
  42. | storage_id | shared::/textfile0 (2).txt |
  43. | file_target | /textfile0.txt |
  44. | share_with | user2 |
  45. | share_with_displayname | user2 |
  46. Scenario: getting all shares of a file with a received share also reshared after revoking the resharing rights
  47. Given user "user0" exists
  48. And user "user1" exists
  49. And user "user2" exists
  50. And user "user3" exists
  51. And file "textfile0.txt" of user "user1" is shared with user "user0"
  52. And user "user0" accepts last share
  53. And save the last share data as "textfile0.txt from user1"
  54. And file "textfile0 (2).txt" of user "user0" is shared with user "user3"
  55. And restore the last share data from "textfile0.txt from user1"
  56. And Updating last share with
  57. | permissions | 1 |
  58. And file "textfile0.txt" of user "user1" is shared with user "user2"
  59. When As an "user0"
  60. And sending "GET" to "/apps/files_sharing/api/v1/shares?reshares=true&path=/textfile0 (2).txt"
  61. Then the list of returned shares has 2 shares
  62. And share 0 is returned with
  63. | share_type | 0 |
  64. | uid_owner | user0 |
  65. | displayname_owner | user0 |
  66. | uid_file_owner | user1 |
  67. | displayname_file_owner | user1 |
  68. | path | /textfile0 (2).txt |
  69. | item_type | file |
  70. | mimetype | text/plain |
  71. | storage_id | shared::/textfile0 (2).txt |
  72. | file_target | /textfile0 (2).txt |
  73. | share_with | user3 |
  74. | share_with_displayname | user3 |
  75. And share 1 is returned with
  76. | share_type | 0 |
  77. | uid_owner | user1 |
  78. | displayname_owner | user1 |
  79. | path | /textfile0 (2).txt |
  80. | item_type | file |
  81. | mimetype | text/plain |
  82. | storage_id | shared::/textfile0 (2).txt |
  83. | file_target | /textfile0.txt |
  84. | share_with | user2 |
  85. | share_with_displayname | user2 |
  86. Scenario: Reshared files can be still accessed if a user in the middle removes it.
  87. Given user "user0" exists
  88. And user "user1" exists
  89. And user "user2" exists
  90. And user "user3" exists
  91. And file "textfile0.txt" of user "user0" is shared with user "user1"
  92. And user "user1" accepts last share
  93. And file "textfile0 (2).txt" of user "user1" is shared with user "user2"
  94. And user "user2" accepts last share
  95. And file "textfile0 (2).txt" of user "user2" is shared with user "user3"
  96. And user "user3" accepts last share
  97. And As an "user1"
  98. When User "user1" deletes file "/textfile0 (2).txt"
  99. And As an "user3"
  100. And Downloading file "/textfile0 (2).txt" with range "bytes=1-8"
  101. Then Downloaded content should be "extcloud"
  102. Scenario: getting share info of a share
  103. Given user "user0" exists
  104. And user "user1" exists
  105. And file "textfile0.txt" of user "user0" is shared with user "user1"
  106. And As an "user0"
  107. When Getting info of last share
  108. Then the OCS status code should be "100"
  109. And the HTTP status code should be "200"
  110. And Share fields of last share match with
  111. | id | A_NUMBER |
  112. | item_type | file |
  113. | item_source | A_NUMBER |
  114. | share_type | 0 |
  115. | share_with | user1 |
  116. | file_source | A_NUMBER |
  117. | file_target | /textfile0.txt |
  118. | path | /textfile0.txt |
  119. | permissions | 19 |
  120. | stime | A_NUMBER |
  121. | storage | A_NUMBER |
  122. | mail_send | 0 |
  123. | uid_owner | user0 |
  124. | storage_id | home::user0 |
  125. | file_parent | A_NUMBER |
  126. | share_with_displayname | user1 |
  127. | displayname_owner | user0 |
  128. | mimetype | text/plain |
  129. Scenario: getting share info of a group share
  130. Given user "user0" exists
  131. And user "user1" exists
  132. And group "group1" exists
  133. And user "user1" belongs to group "group1"
  134. And file "textfile0.txt" of user "user0" is shared with group "group1"
  135. And As an "user0"
  136. When Getting info of last share
  137. Then the OCS status code should be "100"
  138. And the HTTP status code should be "200"
  139. And Share fields of last share match with
  140. | id | A_NUMBER |
  141. | item_type | file |
  142. | item_source | A_NUMBER |
  143. | share_type | 1 |
  144. | share_with | group1 |
  145. | file_source | A_NUMBER |
  146. | file_target | /textfile0.txt |
  147. | path | /textfile0.txt |
  148. | permissions | 19 |
  149. | stime | A_NUMBER |
  150. | storage | A_NUMBER |
  151. | mail_send | 0 |
  152. | uid_owner | user0 |
  153. | storage_id | home::user0 |
  154. | file_parent | A_NUMBER |
  155. | share_with_displayname | group1 |
  156. | displayname_owner | user0 |
  157. | mimetype | text/plain |
  158. And As an "user1"
  159. And accepting last share
  160. And Getting info of last share
  161. And the OCS status code should be "100"
  162. And the HTTP status code should be "200"
  163. And Share fields of last share match with
  164. | id | A_NUMBER |
  165. | item_type | file |
  166. | item_source | A_NUMBER |
  167. | share_type | 1 |
  168. | share_with | group1 |
  169. | file_source | A_NUMBER |
  170. | file_target | /textfile0 (2).txt |
  171. | path | /textfile0 (2).txt |
  172. | permissions | 19 |
  173. | stime | A_NUMBER |
  174. | storage | A_NUMBER |
  175. | mail_send | 0 |
  176. | uid_owner | user0 |
  177. | storage_id | shared::/textfile0 (2).txt |
  178. | file_parent | A_NUMBER |
  179. | share_with_displayname | group1 |
  180. | displayname_owner | user0 |
  181. | mimetype | text/plain |
  182. Scenario: getting all shares including subfiles in a directory
  183. Given user "user0" exists
  184. And user "user1" exists
  185. And user "user2" exists
  186. And file "PARENT/CHILD" of user "user0" is shared with user "user1"
  187. And file "PARENT/parent.txt" of user "user0" is shared with user "user2"
  188. When As an "user0"
  189. And sending "GET" to "/apps/files_sharing/api/v1/shares?subfiles=true&path=PARENT"
  190. Then the list of returned shares has 2 shares
  191. And share 0 is returned with
  192. | share_type | 0 |
  193. | uid_owner | user0 |
  194. | displayname_owner | user0 |
  195. | path | /PARENT/CHILD |
  196. | item_type | folder |
  197. | mimetype | httpd/unix-directory |
  198. | storage_id | home::user0 |
  199. | file_target | /CHILD |
  200. | share_with | user1 |
  201. | share_with_displayname | user1 |
  202. | permissions | 31 |
  203. And share 1 is returned with
  204. | share_type | 0 |
  205. | uid_owner | user0 |
  206. | displayname_owner | user0 |
  207. | path | /PARENT/parent.txt |
  208. | item_type | file |
  209. | mimetype | text/plain |
  210. | storage_id | home::user0 |
  211. | file_target | /parent.txt |
  212. | share_with | user2 |
  213. | share_with_displayname | user2 |
  214. Scenario: getting all shares including subfiles in a directory with received shares
  215. Given user "user0" exists
  216. And user "user1" exists
  217. And file "textfile0.txt" of user "user0" is shared with user "user1"
  218. And user "user1" accepts last share
  219. And file "textfile0.txt" of user "user1" is shared with user "user0"
  220. When As an "user0"
  221. And sending "GET" to "/apps/files_sharing/api/v1/shares?subfiles=true&path=/"
  222. Then the list of returned shares has 1 shares
  223. And share 0 is returned with
  224. | share_type | 0 |
  225. | uid_owner | user0 |
  226. | displayname_owner | user0 |
  227. | path | /textfile0.txt |
  228. | item_type | file |
  229. | mimetype | text/plain |
  230. | storage_id | home::user0 |
  231. | file_target | /textfile0 (2).txt |
  232. | share_with | user1 |
  233. | share_with_displayname | user1 |
  234. Scenario: getting all shares including subfiles in a directory with shares in subdirectories
  235. Given user "user0" exists
  236. And user "user1" exists
  237. And user "user2" exists
  238. And file "PARENT/CHILD" of user "user0" is shared with user "user1"
  239. And file "PARENT/CHILD/child.txt" of user "user0" is shared with user "user2"
  240. When As an "user0"
  241. And sending "GET" to "/apps/files_sharing/api/v1/shares?subfiles=true&path=PARENT"
  242. Then the list of returned shares has 1 shares
  243. And share 0 is returned with
  244. | share_type | 0 |
  245. | uid_owner | user0 |
  246. | displayname_owner | user0 |
  247. | path | /PARENT/CHILD |
  248. | item_type | folder |
  249. | mimetype | httpd/unix-directory |
  250. | storage_id | home::user0 |
  251. | file_target | /CHILD |
  252. | share_with | user1 |
  253. | share_with_displayname | user1 |
  254. | permissions | 31 |
  255. Scenario: getting all shares including subfiles in a shared directory with reshares
  256. Given user "user0" exists
  257. And user "user1" exists
  258. And user "user2" exists
  259. And user "user3" exists
  260. And file "PARENT" of user "user0" is shared with user "user1"
  261. And user "user1" accepts last share
  262. And file "PARENT (2)/CHILD" of user "user1" is shared with user "user2"
  263. And user "user2" accepts last share
  264. And file "CHILD" of user "user2" is shared with user "user3"
  265. When As an "user0"
  266. And sending "GET" to "/apps/files_sharing/api/v1/shares?subfiles=true&path=PARENT"
  267. Then the list of returned shares has 2 shares
  268. And share 0 is returned with
  269. | share_type | 0 |
  270. | uid_owner | user1 |
  271. | displayname_owner | user1 |
  272. | uid_file_owner | user0 |
  273. | displayname_file_owner | user0 |
  274. | path | /PARENT/CHILD |
  275. | item_type | folder |
  276. | mimetype | httpd/unix-directory |
  277. | storage_id | home::user0 |
  278. | file_target | /CHILD |
  279. | share_with | user2 |
  280. | share_with_displayname | user2 |
  281. | permissions | 31 |
  282. And share 1 is returned with
  283. | share_type | 0 |
  284. | uid_owner | user2 |
  285. | displayname_owner | user2 |
  286. | uid_file_owner | user0 |
  287. | displayname_file_owner | user0 |
  288. | path | /PARENT/CHILD |
  289. | item_type | folder |
  290. | mimetype | httpd/unix-directory |
  291. | storage_id | home::user0 |
  292. | file_target | /CHILD |
  293. | share_with | user3 |
  294. | share_with_displayname | user3 |
  295. | permissions | 31 |
  296. Scenario: getting all shares including subfiles in a directory by a resharer
  297. Given user "user0" exists
  298. And user "user1" exists
  299. And user "user2" exists
  300. And user "user3" exists
  301. And file "PARENT" of user "user0" is shared with user "user1"
  302. And user "user1" accepts last share
  303. And file "PARENT (2)/CHILD" of user "user1" is shared with user "user2"
  304. And user "user2" accepts last share
  305. And file "CHILD" of user "user2" is shared with user "user3"
  306. When As an "user1"
  307. And sending "GET" to "/apps/files_sharing/api/v1/shares?subfiles=true&path=PARENT (2)"
  308. Then the list of returned shares has 2 shares
  309. And share 0 is returned with
  310. | share_type | 0 |
  311. | uid_owner | user1 |
  312. | displayname_owner | user1 |
  313. | uid_file_owner | user0 |
  314. | displayname_file_owner | user0 |
  315. | path | /PARENT (2)/CHILD |
  316. | item_type | folder |
  317. | mimetype | httpd/unix-directory |
  318. | storage_id | shared::/PARENT (2) |
  319. | file_target | /CHILD |
  320. | share_with | user2 |
  321. | share_with_displayname | user2 |
  322. | permissions | 31 |
  323. And share 1 is returned with
  324. | share_type | 0 |
  325. | uid_owner | user2 |
  326. | displayname_owner | user2 |
  327. | uid_file_owner | user0 |
  328. | displayname_file_owner | user0 |
  329. | path | /PARENT (2)/CHILD |
  330. | item_type | folder |
  331. | mimetype | httpd/unix-directory |
  332. | storage_id | shared::/PARENT (2) |
  333. | file_target | /CHILD |
  334. | share_with | user3 |
  335. | share_with_displayname | user3 |
  336. | permissions | 31 |
  337. Scenario: getting all shares including subfiles in a directory by a resharer after revoking the resharing rights
  338. Given user "user0" exists
  339. And user "user1" exists
  340. And user "user2" exists
  341. And user "user3" exists
  342. And file "PARENT" of user "user0" is shared with user "user1"
  343. And save the last share data as "parent folder"
  344. And user "user1" accepts last share
  345. And file "PARENT (2)/CHILD" of user "user1" is shared with user "user2"
  346. And user "user2" accepts last share
  347. And file "CHILD" of user "user2" is shared with user "user3"
  348. And As an "user0"
  349. And restore the last share data from "parent folder"
  350. And Updating last share with
  351. | permissions | 1 |
  352. When As an "user1"
  353. And sending "GET" to "/apps/files_sharing/api/v1/shares?subfiles=true&path=PARENT (2)"
  354. Then the list of returned shares has 1 shares
  355. And share 0 is returned with
  356. | share_type | 0 |
  357. | uid_owner | user1 |
  358. | displayname_owner | user1 |
  359. | uid_file_owner | user0 |
  360. | displayname_file_owner | user0 |
  361. | path | /PARENT (2)/CHILD |
  362. | item_type | folder |
  363. | mimetype | httpd/unix-directory |
  364. | storage_id | shared::/PARENT (2) |
  365. | file_target | /CHILD |
  366. | share_with | user2 |
  367. | share_with_displayname | user2 |
  368. | permissions | 31 |
  369. Scenario: getting all shares including subfiles in a directory after moving a received share not reshareable also shared with another user
  370. Given user "user0" exists
  371. And user "user1" exists
  372. And user "user2" exists
  373. And file "textfile0.txt" of user "user1" is shared with user "user0"
  374. And user "user0" accepts last share
  375. And Updating last share with
  376. | permissions | 1 |
  377. And file "textfile0.txt" of user "user1" is shared with user "user2"
  378. And User "user0" moved file "/textfile0 (2).txt" to "/FOLDER/textfile0.txt"
  379. When As an "user0"
  380. And sending "GET" to "/apps/files_sharing/api/v1/shares?subfiles=true&path=/FOLDER"
  381. Then the list of returned shares has 1 shares
  382. And share 0 is returned with
  383. | share_type | 0 |
  384. | uid_owner | user1 |
  385. | displayname_owner | user1 |
  386. | path | /FOLDER/textfile0.txt |
  387. | item_type | file |
  388. | mimetype | text/plain |
  389. | storage_id | shared::/FOLDER/textfile0.txt |
  390. | file_target | /textfile0.txt |
  391. | share_with | user2 |
  392. | share_with_displayname | user2 |
  393. Scenario: getting all shares including subfiles in a directory after moving a share and a received share not reshareable also shared with another user
  394. Given user "user0" exists
  395. And user "user1" exists
  396. And user "user2" exists
  397. And file "textfile0.txt" of user "user0" is shared with user "user1"
  398. And user "user1" accepts last share
  399. And file "textfile0.txt" of user "user1" is shared with user "user0"
  400. And user "user0" accepts last share
  401. And Updating last share with
  402. | permissions | 1 |
  403. And file "textfile0.txt" of user "user1" is shared with user "user2"
  404. And User "user0" moved file "/textfile0.txt" to "/FOLDER/textfile0.txt"
  405. And User "user0" moved file "/textfile0 (2).txt" to "/FOLDER/textfile0 (2).txt"
  406. When As an "user0"
  407. And sending "GET" to "/apps/files_sharing/api/v1/shares?subfiles=true&path=/FOLDER"
  408. Then the list of returned shares has 2 shares
  409. And share 0 is returned with
  410. | share_type | 0 |
  411. | uid_owner | user0 |
  412. | displayname_owner | user0 |
  413. | path | /FOLDER/textfile0.txt |
  414. | item_type | file |
  415. | mimetype | text/plain |
  416. | storage_id | home::user0 |
  417. | file_target | /textfile0 (2).txt |
  418. | share_with | user1 |
  419. | share_with_displayname | user1 |
  420. And share 1 is returned with
  421. | share_type | 0 |
  422. | uid_owner | user1 |
  423. | displayname_owner | user1 |
  424. | path | /FOLDER/textfile0 (2).txt |
  425. | item_type | file |
  426. | mimetype | text/plain |
  427. | storage_id | shared::/FOLDER/textfile0 (2).txt |
  428. | file_target | /textfile0.txt |
  429. | share_with | user2 |
  430. | share_with_displayname | user2 |
  431. Scenario: keep group permissions in sync
  432. Given As an "admin"
  433. Given user "user0" exists
  434. And user "user1" exists
  435. And group "group1" exists
  436. And user "user1" belongs to group "group1"
  437. And file "textfile0.txt" of user "user0" is shared with group "group1"
  438. And user "user1" accepts last share
  439. And User "user1" moved file "/textfile0 (2).txt" to "/FOLDER/textfile0.txt"
  440. And As an "user0"
  441. When Updating last share with
  442. | permissions | 1 |
  443. And Getting info of last share
  444. Then the OCS status code should be "100"
  445. And the HTTP status code should be "200"
  446. And Share fields of last share match with
  447. | id | A_NUMBER |
  448. | item_type | file |
  449. | item_source | A_NUMBER |
  450. | share_type | 1 |
  451. | file_source | A_NUMBER |
  452. | file_target | /textfile0.txt |
  453. | permissions | 1 |
  454. | stime | A_NUMBER |
  455. | storage | A_NUMBER |
  456. | mail_send | 0 |
  457. | uid_owner | user0 |
  458. | storage_id | home::user0 |
  459. | file_parent | A_NUMBER |
  460. | displayname_owner | user0 |
  461. | mimetype | text/plain |
  462. And As an "user1"
  463. And Getting info of last share
  464. And the OCS status code should be "100"
  465. And the HTTP status code should be "200"
  466. And Share fields of last share match with
  467. | id | A_NUMBER |
  468. | item_type | file |
  469. | item_source | A_NUMBER |
  470. | share_type | 1 |
  471. | file_source | A_NUMBER |
  472. | file_target | /FOLDER/textfile0.txt |
  473. | permissions | 1 |
  474. | stime | A_NUMBER |
  475. | storage | A_NUMBER |
  476. | mail_send | 0 |
  477. | uid_owner | user0 |
  478. | storage_id | shared::/FOLDER/textfile0.txt |
  479. | file_parent | A_NUMBER |
  480. | displayname_owner | user0 |
  481. | mimetype | text/plain |
  482. Scenario: Sharee can see the share
  483. Given user "user0" exists
  484. And user "user1" exists
  485. And file "textfile0.txt" of user "user0" is shared with user "user1"
  486. And As an "user1"
  487. When sending "GET" to "/apps/files_sharing/api/v1/shares?shared_with_me=true"
  488. Then the OCS status code should be "100"
  489. And the HTTP status code should be "200"
  490. And last share_id is included in the answer
  491. Scenario: Sharee can see the filtered share
  492. Given user "user0" exists
  493. And user "user1" exists
  494. And file "textfile0.txt" of user "user0" is shared with user "user1"
  495. And file "textfile1.txt" of user "user0" is shared with user "user1"
  496. And user "user1" accepts last share
  497. And As an "user1"
  498. When sending "GET" to "/apps/files_sharing/api/v1/shares?shared_with_me=true&path=textfile1 (2).txt"
  499. Then the OCS status code should be "100"
  500. And the HTTP status code should be "200"
  501. And last share_id is included in the answer
  502. Scenario: Sharee can't see the share that is filtered out
  503. Given user "user0" exists
  504. And user "user1" exists
  505. And file "textfile0.txt" of user "user0" is shared with user "user1"
  506. And user "user1" accepts last share
  507. And file "textfile1.txt" of user "user0" is shared with user "user1"
  508. And As an "user1"
  509. When sending "GET" to "/apps/files_sharing/api/v1/shares?shared_with_me=true&path=textfile0 (2).txt"
  510. Then the OCS status code should be "100"
  511. And the HTTP status code should be "200"
  512. And last share_id is not included in the answer
  513. Scenario: Sharee can see the group share
  514. Given As an "admin"
  515. And user "user0" exists
  516. And user "user1" exists
  517. And group "group0" exists
  518. And user "user1" belongs to group "group0"
  519. And file "textfile0.txt" of user "user0" is shared with group "group0"
  520. And As an "user1"
  521. When sending "GET" to "/apps/files_sharing/api/v1/shares?shared_with_me=true"
  522. Then the OCS status code should be "100"
  523. And the HTTP status code should be "200"
  524. And last share_id is included in the answer
  525. Scenario: User is not allowed to reshare file
  526. As an "admin"
  527. Given user "user0" exists
  528. And user "user1" exists
  529. And user "user2" exists
  530. And As an "user0"
  531. And creating a share with
  532. | path | /textfile0.txt |
  533. | shareType | 0 |
  534. | shareWith | user1 |
  535. | permissions | 8 |
  536. And As an "user1"
  537. And accepting last share
  538. When creating a share with
  539. | path | /textfile0 (2).txt |
  540. | shareType | 0 |
  541. | shareWith | user2 |
  542. | permissions | 31 |
  543. Then the OCS status code should be "404"
  544. And the HTTP status code should be "200"
  545. Scenario: User is allowed to reshare file with more permissions if shares of same file to same user have them
  546. Given user "user0" exists
  547. And user "user1" exists
  548. And user "user2" exists
  549. And group "group1" exists
  550. And user "user1" belongs to group "group1"
  551. And As an "user0"
  552. And creating a share with
  553. | path | /textfile0.txt |
  554. | shareType | 1 |
  555. | shareWith | group1 |
  556. | permissions | 15 |
  557. And As an "user1"
  558. And accepting last share
  559. And As an "user0"
  560. And creating a share with
  561. | path | /textfile0.txt |
  562. | shareType | 0 |
  563. | shareWith | user1 |
  564. | permissions | 17 |
  565. And As an "user1"
  566. And accepting last share
  567. When creating a share with
  568. | path | /textfile0 (2).txt |
  569. | shareType | 0 |
  570. | shareWith | user2 |
  571. | permissions | 19 |
  572. Then the OCS status code should be "100"
  573. And the HTTP status code should be "200"
  574. Scenario: User is not allowed to reshare file with more permissions
  575. As an "admin"
  576. Given user "user0" exists
  577. And user "user1" exists
  578. And user "user2" exists
  579. And As an "user0"
  580. And creating a share with
  581. | path | /textfile0.txt |
  582. | shareType | 0 |
  583. | shareWith | user1 |
  584. | permissions | 16 |
  585. And As an "user1"
  586. And accepting last share
  587. When creating a share with
  588. | path | /textfile0 (2).txt |
  589. | shareType | 0 |
  590. | shareWith | user2 |
  591. | permissions | 31 |
  592. Then the OCS status code should be "404"
  593. And the HTTP status code should be "200"
  594. Scenario: User is not allowed to reshare file with more permissions even if shares of same file to other users have them
  595. Given user "user0" exists
  596. And user "user1" exists
  597. And user "user2" exists
  598. And user "user3" exists
  599. And As an "user0"
  600. And creating a share with
  601. | path | /textfile0.txt |
  602. | shareType | 0 |
  603. | shareWith | user3 |
  604. | permissions | 15 |
  605. And As an "user3"
  606. And accepting last share
  607. And As an "user0"
  608. And creating a share with
  609. | path | /textfile0.txt |
  610. | shareType | 0 |
  611. | shareWith | user1 |
  612. | permissions | 17 |
  613. And As an "user1"
  614. And accepting last share
  615. When creating a share with
  616. | path | /textfile0 (2).txt |
  617. | shareType | 0 |
  618. | shareWith | user2 |
  619. | permissions | 19 |
  620. Then the OCS status code should be "404"
  621. And the HTTP status code should be "200"
  622. Scenario: User is not allowed to reshare file with more permissions even if shares of other files from same user have them
  623. Given user "user0" exists
  624. And user "user1" exists
  625. And user "user2" exists
  626. And As an "user0"
  627. And creating a share with
  628. | path | /textfile0.txt |
  629. | shareType | 0 |
  630. | shareWith | user1 |
  631. | permissions | 15 |
  632. And As an "user1"
  633. And accepting last share
  634. And As an "user0"
  635. And creating a share with
  636. | path | /textfile1.txt |
  637. | shareType | 0 |
  638. | shareWith | user1 |
  639. | permissions | 17 |
  640. And As an "user1"
  641. And accepting last share
  642. When creating a share with
  643. | path | /textfile1 (2).txt |
  644. | shareType | 0 |
  645. | shareWith | user2 |
  646. | permissions | 19 |
  647. Then the OCS status code should be "404"
  648. And the HTTP status code should be "200"
  649. Scenario: User is not allowed to reshare file with more permissions even if shares of other files from other users have them
  650. Given user "user0" exists
  651. And user "user1" exists
  652. And user "user2" exists
  653. And user "user3" exists
  654. And As an "user3"
  655. And creating a share with
  656. | path | /textfile0.txt |
  657. | shareType | 0 |
  658. | shareWith | user1 |
  659. | permissions | 15 |
  660. And As an "user1"
  661. And accepting last share
  662. And As an "user0"
  663. And creating a share with
  664. | path | /textfile1.txt |
  665. | shareType | 0 |
  666. | shareWith | user1 |
  667. | permissions | 17 |
  668. And As an "user1"
  669. And accepting last share
  670. When creating a share with
  671. | path | /textfile1 (2).txt |
  672. | shareType | 0 |
  673. | shareWith | user2 |
  674. | permissions | 19 |
  675. Then the OCS status code should be "404"
  676. And the HTTP status code should be "200"
  677. Scenario: User is not allowed to reshare file with additional delete permissions
  678. As an "admin"
  679. Given user "user0" exists
  680. And user "user1" exists
  681. And user "user2" exists
  682. And As an "user0"
  683. And creating a share with
  684. | path | /PARENT |
  685. | shareType | 0 |
  686. | shareWith | user1 |
  687. | permissions | 16 |
  688. And As an "user1"
  689. And accepting last share
  690. When creating a share with
  691. | path | /PARENT (2) |
  692. | shareType | 0 |
  693. | shareWith | user2 |
  694. | permissions | 25 |
  695. Then the OCS status code should be "404"
  696. And the HTTP status code should be "200"
  697. Scenario: User is not allowed to reshare file with additional delete permissions for files
  698. As an "admin"
  699. Given user "user0" exists
  700. And user "user1" exists
  701. And user "user2" exists
  702. And As an "user0"
  703. And creating a share with
  704. | path | /textfile0.txt |
  705. | shareType | 0 |
  706. | shareWith | user1 |
  707. | permissions | 16 |
  708. And As an "user1"
  709. And accepting last share
  710. When creating a share with
  711. | path | /textfile0 (2).txt |
  712. | shareType | 0 |
  713. | shareWith | user2 |
  714. | permissions | 25 |
  715. Then the OCS status code should be "100"
  716. And the HTTP status code should be "200"
  717. When Getting info of last share
  718. Then Share fields of last share match with
  719. | id | A_NUMBER |
  720. | item_type | file |
  721. | item_source | A_NUMBER |
  722. | share_type | 0 |
  723. | share_with | user2 |
  724. | file_source | A_NUMBER |
  725. | file_target | /textfile0 (2).txt |
  726. | path | /textfile0 (2).txt |
  727. | permissions | 17 |
  728. | stime | A_NUMBER |
  729. | storage | A_NUMBER |
  730. | mail_send | 0 |
  731. | uid_owner | user1 |
  732. | storage_id | shared::/textfile0 (2).txt |
  733. | file_parent | A_NUMBER |
  734. | share_with_displayname | user2 |
  735. | displayname_owner | user1 |
  736. | mimetype | text/plain |
  737. Scenario: Get a share with a user which didn't received the share
  738. Given user "user0" exists
  739. And user "user1" exists
  740. And user "user2" exists
  741. And file "textfile0.txt" of user "user0" is shared with user "user1"
  742. And As an "user2"
  743. When Getting info of last share
  744. Then the OCS status code should be "404"
  745. And the HTTP status code should be "200"
  746. Scenario: Get a share with a user with resharing rights
  747. Given user "user0" exists
  748. And user "user1" exists
  749. And user "user2" exists
  750. And file "textfile0.txt" of user "user0" is shared with user "user1"
  751. And user "user1" accepts last share
  752. And file "textfile0.txt" of user "user0" is shared with user "user2"
  753. And As an "user1"
  754. When Getting info of last share
  755. Then the OCS status code should be "100"
  756. And the HTTP status code should be "200"
  757. And Share fields of last share match with
  758. | id | A_NUMBER |
  759. | item_type | file |
  760. | item_source | A_NUMBER |
  761. | share_type | 0 |
  762. | share_with | user2 |
  763. | file_source | A_NUMBER |
  764. | file_target | /textfile0.txt |
  765. | path | /textfile0 (2).txt |
  766. | permissions | 19 |
  767. | stime | A_NUMBER |
  768. | storage | A_NUMBER |
  769. | mail_send | 0 |
  770. | uid_owner | user0 |
  771. | storage_id | shared::/textfile0 (2).txt |
  772. | file_parent | A_NUMBER |
  773. | share_with_displayname | user2 |
  774. | displayname_owner | user0 |
  775. | mimetype | text/plain |
  776. Scenario: Share of folder and sub-folder to same user - core#20645
  777. Given As an "admin"
  778. And user "user0" exists
  779. And user "user1" exists
  780. And group "group0" exists
  781. And user "user1" belongs to group "group0"
  782. And file "/PARENT" of user "user0" is shared with user "user1"
  783. And user "user1" accepts last share
  784. When file "/PARENT/CHILD" of user "user0" is shared with group "group0"
  785. And user "user1" accepts last share
  786. Then user "user1" should see following elements
  787. | /FOLDER/ |
  788. | /PARENT/ |
  789. | /PARENT/CHILD/ |
  790. | /PARENT/parent.txt |
  791. | /PARENT/CHILD/child.txt |
  792. | /PARENT%20(2)/ |
  793. | /PARENT%20(2)/CHILD/ |
  794. | /PARENT%20(2)/parent.txt |
  795. | /PARENT%20(2)/CHILD/child.txt |
  796. | /CHILD/ |
  797. | /CHILD/child.txt |
  798. And the HTTP status code should be "200"
  799. Scenario: Share a file by multiple channels
  800. Given As an "admin"
  801. And user "user0" exists
  802. And user "user1" exists
  803. And user "user2" exists
  804. And group "group0" exists
  805. And user "user1" belongs to group "group0"
  806. And user "user2" belongs to group "group0"
  807. And user "user0" created a folder "/common"
  808. And user "user0" created a folder "/common/sub"
  809. And file "common" of user "user0" is shared with group "group0"
  810. And user "user1" accepts last share
  811. And user "user2" accepts last share
  812. And file "textfile0.txt" of user "user1" is shared with user "user2"
  813. And user "user2" accepts last share
  814. And User "user1" moved file "/textfile0.txt" to "/common/textfile0.txt"
  815. And User "user1" moved file "/common/textfile0.txt" to "/common/sub/textfile0.txt"
  816. And As an "user2"
  817. When Downloading file "/common/sub/textfile0.txt" with range "bytes=10-18"
  818. Then Downloaded content should be "test text"
  819. And Downloaded content when downloading file "/textfile0.txt" with range "bytes=10-18" should be "test text"
  820. And user "user2" should see following elements
  821. | /common/sub/textfile0.txt |
  822. Scenario: Share a file by multiple channels
  823. Given As an "admin"
  824. And user "user0" exists
  825. And user "user1" exists
  826. And user "user2" exists
  827. And group "group0" exists
  828. And user "user1" belongs to group "group0"
  829. And user "user2" belongs to group "group0"
  830. And user "user0" created a folder "/common"
  831. And user "user0" created a folder "/common/sub"
  832. And file "common" of user "user0" is shared with group "group0"
  833. And user "user1" accepts last share
  834. And user "user2" accepts last share
  835. And file "textfile0.txt" of user "user1" is shared with user "user2"
  836. And user "user2" accepts last share
  837. And User "user1" moved file "/textfile0.txt" to "/common/textfile0.txt"
  838. And User "user1" moved file "/common/textfile0.txt" to "/common/sub/textfile0.txt"
  839. And As an "user2"
  840. When Downloading file "/textfile0 (2).txt" with range "bytes=10-18"
  841. Then Downloaded content should be "test text"
  842. And user "user2" should see following elements
  843. | /common/sub/textfile0.txt |
  844. Scenario: Delete all group shares
  845. Given As an "admin"
  846. And user "user0" exists
  847. And user "user1" exists
  848. And group "group1" exists
  849. And user "user1" belongs to group "group1"
  850. And file "textfile0.txt" of user "user0" is shared with group "group1"
  851. And user "user1" accepts last share
  852. And User "user1" moved file "/textfile0 (2).txt" to "/FOLDER/textfile0.txt"
  853. And As an "user0"
  854. And Deleting last share
  855. And As an "user1"
  856. When sending "GET" to "/apps/files_sharing/api/v1/shares?shared_with_me=true"
  857. Then the OCS status code should be "100"
  858. And the HTTP status code should be "200"
  859. And last share_id is not included in the answer
  860. Scenario: delete a share
  861. Given user "user0" exists
  862. And user "user1" exists
  863. And file "textfile0.txt" of user "user0" is shared with user "user1"
  864. And As an "user0"
  865. When Deleting last share
  866. Then the OCS status code should be "100"
  867. And the HTTP status code should be "200"
  868. Scenario: delete a share with a user that didn't receive the share
  869. Given user "user0" exists
  870. And user "user1" exists
  871. And user "user2" exists
  872. And file "textfile0.txt" of user "user0" is shared with user "user1"
  873. And As an "user2"
  874. When Deleting last share
  875. Then the OCS status code should be "404"
  876. And the HTTP status code should be "200"
  877. Scenario: delete a share with a user with resharing rights that didn't receive the share
  878. Given user "user0" exists
  879. And user "user1" exists
  880. And user "user2" exists
  881. And file "textfile0.txt" of user "user0" is shared with user "user1"
  882. And user "user1" accepts last share
  883. And file "textfile0.txt" of user "user0" is shared with user "user2"
  884. And As an "user1"
  885. When Deleting last share
  886. Then the OCS status code should be "403"
  887. And the HTTP status code should be "200"
  888. Scenario: Keep usergroup shares (#22143)
  889. Given As an "admin"
  890. And user "user0" exists
  891. And user "user1" exists
  892. And user "user2" exists
  893. And group "group" exists
  894. And user "user1" belongs to group "group"
  895. And user "user2" belongs to group "group"
  896. And user "user0" created a folder "/TMP"
  897. And file "TMP" of user "user0" is shared with group "group"
  898. And user "user1" accepts last share
  899. And user "user2" accepts last share
  900. And user "user1" created a folder "/myFOLDER"
  901. And User "user1" moves file "/TMP" to "/myFOLDER/myTMP"
  902. And user "user2" does not exist
  903. And user "user1" should see following elements
  904. | /myFOLDER/myTMP/ |
  905. Scenario: Check quota of owners parent directory of a shared file
  906. Given using old dav path
  907. And As an "admin"
  908. And user "user0" exists
  909. And user "user1" exists
  910. And user "user1" has a quota of "0"
  911. And User "user0" moved file "/welcome.txt" to "/myfile.txt"
  912. And file "myfile.txt" of user "user0" is shared with user "user1"
  913. And user "user1" accepts last share
  914. When User "user1" uploads file "data/textfile.txt" to "/myfile.txt"
  915. Then the HTTP status code should be "204"
  916. Scenario: Don't allow sharing of the root
  917. Given user "user0" exists
  918. And As an "user0"
  919. When creating a share with
  920. | path | / |
  921. | shareType | 3 |
  922. Then the OCS status code should be "403"
  923. Scenario: Allow modification of reshare
  924. Given user "user0" exists
  925. And user "user1" exists
  926. And user "user2" exists
  927. And user "user0" created a folder "/TMP"
  928. And file "TMP" of user "user0" is shared with user "user1"
  929. And user "user1" accepts last share
  930. And file "TMP" of user "user1" is shared with user "user2"
  931. And As an "user1"
  932. When Updating last share with
  933. | permissions | 1 |
  934. Then the OCS status code should be "100"
  935. And the HTTP status code should be "200"
  936. Scenario: Allow reshare to exceed permissions if shares of same file to same user have them
  937. Given user "user0" exists
  938. And user "user1" exists
  939. And user "user2" exists
  940. And group "group1" exists
  941. And user "user1" belongs to group "group1"
  942. And user "user0" created a folder "/TMP"
  943. And As an "user0"
  944. And creating a share with
  945. | path | /TMP |
  946. | shareType | 1 |
  947. | shareWith | group1 |
  948. | permissions | 15 |
  949. And As an "user1"
  950. And accepting last share
  951. And As an "user0"
  952. And creating a share with
  953. | path | /TMP |
  954. | shareType | 0 |
  955. | shareWith | user1 |
  956. | permissions | 17 |
  957. And As an "user1"
  958. And accepting last share
  959. And creating a share with
  960. | path | /TMP |
  961. | shareType | 0 |
  962. | shareWith | user2 |
  963. | permissions | 17 |
  964. When Updating last share with
  965. | permissions | 31 |
  966. Then the OCS status code should be "100"
  967. And the HTTP status code should be "200"
  968. Scenario: Do not allow reshare to exceed permissions
  969. Given user "user0" exists
  970. And user "user1" exists
  971. And user "user2" exists
  972. And user "user0" created a folder "/TMP"
  973. And As an "user0"
  974. And creating a share with
  975. | path | /TMP |
  976. | shareType | 0 |
  977. | shareWith | user1 |
  978. | permissions | 21 |
  979. And As an "user1"
  980. And accepting last share
  981. And creating a share with
  982. | path | /TMP |
  983. | shareType | 0 |
  984. | shareWith | user2 |
  985. | permissions | 21 |
  986. When Updating last share with
  987. | permissions | 31 |
  988. Then the OCS status code should be "404"
  989. And the HTTP status code should be "200"
  990. Scenario: Do not allow reshare to exceed permissions even if shares of same file to other users have them
  991. Given user "user0" exists
  992. And user "user1" exists
  993. And user "user2" exists
  994. And user "user3" exists
  995. And user "user0" created a folder "/TMP"
  996. And As an "user0"
  997. And creating a share with
  998. | path | /TMP |
  999. | shareType | 0 |
  1000. | shareWith | user3 |
  1001. | permissions | 15 |
  1002. And As an "user3"
  1003. And accepting last share
  1004. And As an "user0"
  1005. And creating a share with
  1006. | path | /TMP |
  1007. | shareType | 0 |
  1008. | shareWith | user1 |
  1009. | permissions | 21 |
  1010. And As an "user1"
  1011. And accepting last share
  1012. And creating a share with
  1013. | path | /TMP |
  1014. | shareType | 0 |
  1015. | shareWith | user2 |
  1016. | permissions | 21 |
  1017. When Updating last share with
  1018. | permissions | 31 |
  1019. Then the OCS status code should be "404"
  1020. And the HTTP status code should be "200"
  1021. Scenario: Do not allow reshare to exceed permissions even if shares of other files from same user have them
  1022. Given user "user0" exists
  1023. And user "user1" exists
  1024. And user "user2" exists
  1025. And As an "user0"
  1026. And creating a share with
  1027. | path | /FOLDER |
  1028. | shareType | 0 |
  1029. | shareWith | user1 |
  1030. | permissions | 15 |
  1031. And As an "user1"
  1032. And accepting last share
  1033. And user "user0" created a folder "/TMP"
  1034. And As an "user0"
  1035. And creating a share with
  1036. | path | /TMP |
  1037. | shareType | 0 |
  1038. | shareWith | user1 |
  1039. | permissions | 21 |
  1040. And As an "user1"
  1041. And accepting last share
  1042. And creating a share with
  1043. | path | /TMP |
  1044. | shareType | 0 |
  1045. | shareWith | user2 |
  1046. | permissions | 21 |
  1047. When Updating last share with
  1048. | permissions | 31 |
  1049. Then the OCS status code should be "404"
  1050. And the HTTP status code should be "200"
  1051. Scenario: Do not allow reshare to exceed permissions even if shares of other files from other users have them
  1052. Given user "user0" exists
  1053. And user "user1" exists
  1054. And user "user2" exists
  1055. And user "user3" exists
  1056. And As an "user3"
  1057. And creating a share with
  1058. | path | /FOLDER |
  1059. | shareType | 0 |
  1060. | shareWith | user1 |
  1061. | permissions | 15 |
  1062. And As an "user1"
  1063. And accepting last share
  1064. And user "user0" created a folder "/TMP"
  1065. And As an "user0"
  1066. And creating a share with
  1067. | path | /TMP |
  1068. | shareType | 0 |
  1069. | shareWith | user1 |
  1070. | permissions | 21 |
  1071. And As an "user1"
  1072. And accepting last share
  1073. And creating a share with
  1074. | path | /TMP |
  1075. | shareType | 0 |
  1076. | shareWith | user2 |
  1077. | permissions | 21 |
  1078. When Updating last share with
  1079. | permissions | 31 |
  1080. Then the OCS status code should be "404"
  1081. And the HTTP status code should be "200"
  1082. Scenario: Do not allow sub reshare to exceed permissions
  1083. Given user "user0" exists
  1084. And user "user1" exists
  1085. And user "user2" exists
  1086. And user "user0" created a folder "/TMP"
  1087. And user "user0" created a folder "/TMP/SUB"
  1088. And As an "user0"
  1089. And creating a share with
  1090. | path | /TMP |
  1091. | shareType | 0 |
  1092. | shareWith | user1 |
  1093. | permissions | 21 |
  1094. And As an "user1"
  1095. And accepting last share
  1096. And creating a share with
  1097. | path | /TMP/SUB |
  1098. | shareType | 0 |
  1099. | shareWith | user2 |
  1100. | permissions | 21 |
  1101. When Updating last share with
  1102. | permissions | 31 |
  1103. Then the OCS status code should be "404"
  1104. And the HTTP status code should be "200"
  1105. Scenario: Only allow 1 link share per file/folder
  1106. Given user "user0" exists
  1107. And As an "user0"
  1108. And creating a share with
  1109. | path | welcome.txt |
  1110. | shareType | 3 |
  1111. When save last share id
  1112. And creating a share with
  1113. | path | welcome.txt |
  1114. | shareType | 3 |
  1115. Then share ids should match
  1116. Scenario: Correct webdav share-permissions for owned file
  1117. Given user "user0" exists
  1118. And User "user0" uploads file with content "foo" to "/tmp.txt"
  1119. When as "user0" gets properties of folder "/tmp.txt" with
  1120. |{http://open-collaboration-services.org/ns}share-permissions |
  1121. Then the single response should contain a property "{http://open-collaboration-services.org/ns}share-permissions" with value "19"
  1122. Scenario: Cannot download a file when it's shared view-only
  1123. Given user "user0" exists
  1124. And user "user1" exists
  1125. And User "user0" moves file "/textfile0.txt" to "/document.odt"
  1126. And file "document.odt" of user "user0" is shared with user "user1" view-only
  1127. And user "user1" accepts last share
  1128. When As an "user1"
  1129. And Downloading file "/document.odt"
  1130. Then the HTTP status code should be "403"
  1131. Scenario: Cannot download a file when its parent is shared view-only
  1132. Given user "user0" exists
  1133. And user "user1" exists
  1134. And User "user0" created a folder "/sharedviewonly"
  1135. And User "user0" moves file "/textfile0.txt" to "/sharedviewonly/document.odt"
  1136. And folder "sharedviewonly" of user "user0" is shared with user "user1" view-only
  1137. And user "user1" accepts last share
  1138. When As an "user1"
  1139. And Downloading file "/sharedviewonly/document.odt"
  1140. Then the HTTP status code should be "403"
  1141. Scenario: Cannot copy a file when it's shared view-only
  1142. Given user "user0" exists
  1143. And user "user1" exists
  1144. And User "user0" moves file "/textfile0.txt" to "/document.odt"
  1145. And file "document.odt" of user "user0" is shared with user "user1" view-only
  1146. And user "user1" accepts last share
  1147. When User "user1" copies file "/document.odt" to "/copyforbidden.odt"
  1148. Then the HTTP status code should be "403"
  1149. Scenario: Cannot copy a file when its parent is shared view-only
  1150. Given user "user0" exists
  1151. And user "user1" exists
  1152. And User "user0" created a folder "/sharedviewonly"
  1153. And User "user0" moves file "/textfile0.txt" to "/sharedviewonly/document.odt"
  1154. And folder "sharedviewonly" of user "user0" is shared with user "user1" view-only
  1155. And user "user1" accepts last share
  1156. When User "user1" copies file "/sharedviewonly/document.odt" to "/copyforbidden.odt"
  1157. Then the HTTP status code should be "403"
  1158. # See sharing-v1-part3.feature