sharing-v1-part2.feature 45 KB

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