You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

transfer-ownership.feature 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  1. Feature: transfer-ownership
  2. Scenario: transferring ownership of a file
  3. Given user "user0" exists
  4. And user "user1" exists
  5. And User "user0" uploads file "data/textfile.txt" to "/somefile.txt"
  6. When transferring ownership from "user0" to "user1"
  7. And the command was successful
  8. And As an "user1"
  9. And using received transfer folder of "user1" as dav path
  10. Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
  11. And using old dav path
  12. And as "user0" the file "/somefile.txt" does not exist
  13. And using received transfer folder of "user1" as dav path
  14. And as "user1" the file "/somefile.txt" exists
  15. Scenario: transferring ownership of a folder
  16. Given user "user0" exists
  17. And user "user1" exists
  18. And User "user0" created a folder "/test"
  19. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  20. When transferring ownership from "user0" to "user1"
  21. And the command was successful
  22. And As an "user1"
  23. And using received transfer folder of "user1" as dav path
  24. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  25. And using old dav path
  26. And as "user0" the folder "/test" does not exist
  27. And using received transfer folder of "user1" as dav path
  28. And as "user1" the folder "/test" exists
  29. Scenario: transferring ownership from user with risky display name
  30. Given user "user0" with displayname "user0 \"risky\"? ヂspḷay 'na|\/|e':.#" exists
  31. And user "user1" exists
  32. And User "user0" created a folder "/test"
  33. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  34. When transferring ownership from "user0" to "user1"
  35. And the command was successful
  36. And As an "user1"
  37. And using received transfer folder of "user1" as dav path
  38. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  39. And transfer folder name contains "transferred from user0 -risky- ヂspḷay -na|-|e- on"
  40. And using old dav path
  41. And as "user0" the folder "/test" does not exist
  42. And using received transfer folder of "user1" as dav path
  43. And as "user1" the folder "/test" exists
  44. Scenario: transferring ownership of file shares
  45. Given user "user0" exists
  46. And user "user1" exists
  47. And user "user2" exists
  48. And User "user0" uploads file "data/textfile.txt" to "/somefile.txt"
  49. And file "/somefile.txt" of user "user0" is shared with user "user2" with permissions 19
  50. And user "user2" accepts last share
  51. When transferring ownership from "user0" to "user1"
  52. And the command was successful
  53. And As an "user2"
  54. Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
  55. And using old dav path
  56. And as "user0" the file "/somefile.txt" does not exist
  57. And using received transfer folder of "user1" as dav path
  58. And as "user1" the file "/somefile.txt" exists
  59. And As an "user1"
  60. And Getting info of last share
  61. And the OCS status code should be "100"
  62. And Share fields of last share match with
  63. | uid_owner | user1 |
  64. | uid_file_owner | user1 |
  65. | share_with | user2 |
  66. Scenario: transferring ownership of folder shared with third user
  67. Given user "user0" exists
  68. And user "user1" exists
  69. And user "user2" exists
  70. And User "user0" created a folder "/test"
  71. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  72. And folder "/test" of user "user0" is shared with user "user2" with permissions 31
  73. And user "user2" accepts last share
  74. When transferring ownership from "user0" to "user1"
  75. And the command was successful
  76. And As an "user2"
  77. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  78. And using old dav path
  79. And as "user0" the folder "/test" does not exist
  80. And using received transfer folder of "user1" as dav path
  81. And as "user1" the folder "/test" exists
  82. And As an "user1"
  83. And Getting info of last share
  84. And the OCS status code should be "100"
  85. And Share fields of last share match with
  86. | uid_owner | user1 |
  87. | uid_file_owner | user1 |
  88. | share_with | user2 |
  89. Scenario: transferring ownership of folder shared with transfer recipient
  90. Given user "user0" exists
  91. And user "user1" exists
  92. And User "user0" created a folder "/test"
  93. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  94. And folder "/test" of user "user0" is shared with user "user1" with permissions 31
  95. And user "user1" accepts last share
  96. When transferring ownership from "user0" to "user1"
  97. And the command was successful
  98. And As an "user1"
  99. Then as "user1" the folder "/test" does not exist
  100. And using received transfer folder of "user1" as dav path
  101. And Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  102. And using old dav path
  103. And as "user0" the folder "/test" does not exist
  104. And using received transfer folder of "user1" as dav path
  105. And as "user1" the folder "/test" exists
  106. And Getting info of last share
  107. And the OCS status code should be "404"
  108. Scenario: transferring ownership of folder doubly shared with third user
  109. Given group "group1" exists
  110. And user "user0" exists
  111. And user "user1" exists
  112. And user "user2" exists
  113. And user "user2" belongs to group "group1"
  114. And User "user0" created a folder "/test"
  115. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  116. And folder "/test" of user "user0" is shared with group "group1" with permissions 31
  117. And user "user2" accepts last share
  118. And folder "/test" of user "user0" is shared with user "user2" with permissions 31
  119. And user "user2" accepts last share
  120. When transferring ownership from "user0" to "user1"
  121. And the command was successful
  122. And As an "user2"
  123. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  124. And using old dav path
  125. And as "user0" the folder "/test" does not exist
  126. And using received transfer folder of "user1" as dav path
  127. And as "user1" the folder "/test" exists
  128. And As an "user1"
  129. And Getting info of last share
  130. And the OCS status code should be "100"
  131. And Share fields of last share match with
  132. | uid_owner | user1 |
  133. | uid_file_owner | user1 |
  134. | share_with | user2 |
  135. Scenario: transferring ownership of file shares to user with the same id as the group
  136. Given user "user0" exists
  137. And user "test" exists
  138. And user "user2" exists
  139. And group "test" exists
  140. And user "user2" belongs to group "test"
  141. And User "user0" uploads file "data/textfile.txt" to "/somefile.txt"
  142. And file "/somefile.txt" of user "user0" is shared with group "test"
  143. And user "user2" accepts last share
  144. When transferring ownership from "user0" to "test"
  145. And the command was successful
  146. And As an "user2"
  147. Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
  148. And using old dav path
  149. And as "user0" the file "/somefile.txt" does not exist
  150. And using received transfer folder of "user1" as dav path
  151. And as "test" the file "/somefile.txt" exists
  152. And As an "test"
  153. And Getting info of last share
  154. And the OCS status code should be "100"
  155. And Share fields of last share match with
  156. | uid_owner | test |
  157. | uid_file_owner | test |
  158. | share_with | test |
  159. Scenario: transferring ownership of folder reshared with another user
  160. Given user "user0" exists
  161. And user "user1" exists
  162. And user "user2" exists
  163. And user "user3" exists
  164. And User "user3" created a folder "/test"
  165. And User "user3" uploads file "data/textfile.txt" to "/test/somefile.txt"
  166. And folder "/test" of user "user3" is shared with user "user0" with permissions 31
  167. And user "user0" accepts last share
  168. And folder "/test" of user "user0" is shared with user "user2" with permissions 31
  169. And user "user2" accepts last share
  170. When transferring ownership from "user0" to "user1"
  171. And the command was successful
  172. And As an "user2"
  173. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  174. And using old dav path
  175. And as "user0" the folder "/test" exists
  176. And using received transfer folder of "user1" as dav path
  177. And as "user1" the folder "/test" does not exist
  178. And As an "user0"
  179. And Getting info of last share
  180. And the OCS status code should be "100"
  181. And Share fields of last share match with
  182. | uid_owner | user0 |
  183. | uid_file_owner | user3 |
  184. | share_with | user2 |
  185. Scenario: transferring ownership of folder reshared with group to a user in the group
  186. Given user "user0" exists
  187. And user "user1" exists
  188. And user "user2" exists
  189. And user "user3" exists
  190. And group "group1" exists
  191. And user "user1" belongs to group "group1"
  192. And User "user3" created a folder "/test"
  193. And User "user3" uploads file "data/textfile.txt" to "/test/somefile.txt"
  194. And folder "/test" of user "user3" is shared with user "user0" with permissions 31
  195. And user "user0" accepts last share
  196. And folder "/test" of user "user0" is shared with group "group1" with permissions 31
  197. And user "user1" accepts last share
  198. When transferring ownership from "user0" to "user1"
  199. And the command was successful
  200. And As an "user1"
  201. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  202. And using old dav path
  203. And as "user0" the folder "/test" exists
  204. And using received transfer folder of "user1" as dav path
  205. And as "user1" the folder "/test" does not exist
  206. And As an "user1"
  207. And Getting info of last share
  208. And the OCS status code should be "100"
  209. And Share fields of last share match with
  210. | uid_owner | user1 |
  211. | uid_file_owner | user3 |
  212. | share_with | group1 |
  213. Scenario: transferring ownership of folder reshared with group to a user not in the group
  214. Given user "user0" exists
  215. And user "user1" exists
  216. And user "user2" exists
  217. And user "user3" exists
  218. And group "group1" exists
  219. And user "user2" belongs to group "group1"
  220. And User "user3" created a folder "/test"
  221. And User "user3" uploads file "data/textfile.txt" to "/test/somefile.txt"
  222. And folder "/test" of user "user3" is shared with user "user0" with permissions 31
  223. And user "user0" accepts last share
  224. And folder "/test" of user "user0" is shared with group "group1" with permissions 31
  225. And user "user2" accepts last share
  226. When transferring ownership from "user0" to "user1"
  227. And the command was successful
  228. And As an "user2"
  229. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  230. And using old dav path
  231. And as "user0" the folder "/test" exists
  232. And using received transfer folder of "user1" as dav path
  233. And as "user1" the folder "/test" does not exist
  234. And As an "user0"
  235. And Getting info of last share
  236. And the OCS status code should be "100"
  237. And Share fields of last share match with
  238. | uid_owner | user0 |
  239. | uid_file_owner | user3 |
  240. | share_with | group1 |
  241. Scenario: transferring ownership does not transfer received shares
  242. Given user "user0" exists
  243. And user "user1" exists
  244. And user "user2" exists
  245. And User "user2" created a folder "/test"
  246. And folder "/test" of user "user2" is shared with user "user0" with permissions 31
  247. And user "user0" accepts last share
  248. When transferring ownership from "user0" to "user1"
  249. And the command was successful
  250. And As an "user1"
  251. And using received transfer folder of "user1" as dav path
  252. Then as "user1" the folder "/test" does not exist
  253. And using old dav path
  254. And as "user0" the folder "/test" exists
  255. And As an "user2"
  256. And Getting info of last share
  257. And the OCS status code should be "100"
  258. And Share fields of last share match with
  259. | uid_owner | user2 |
  260. | uid_file_owner | user2 |
  261. | share_with | user0 |
  262. @local_storage
  263. Scenario: transferring ownership does not transfer external storage
  264. Given user "user0" exists
  265. And user "user1" exists
  266. When transferring ownership from "user0" to "user1"
  267. And the command was successful
  268. And As an "user1"
  269. And using received transfer folder of "user1" as dav path
  270. Then as "user1" the folder "/local_storage" does not exist
  271. Scenario: transferring ownership does not fail with shared trashed files
  272. Given user "user0" exists
  273. And user "user1" exists
  274. And user "user2" exists
  275. And User "user0" created a folder "/sub"
  276. And User "user0" created a folder "/sub/test"
  277. And folder "/sub/test" of user "user0" is shared with user "user2" with permissions 31
  278. And user "user2" accepts last share
  279. And User "user0" deletes folder "/sub"
  280. When transferring ownership from "user0" to "user1"
  281. Then the command was successful
  282. Scenario: transferring ownership fails with invalid source user
  283. Given user "user0" exists
  284. When transferring ownership from "invalid_user" to "user0"
  285. Then the command output contains the text "Unknown source user"
  286. And the command failed with exit code 1
  287. Scenario: transferring ownership fails with invalid target user
  288. Given user "user0" exists
  289. When transferring ownership from "user0" to "invalid_user"
  290. Then the command output contains the text "Unknown destination user invalid_user"
  291. And the command failed with exit code 1
  292. Scenario: transferring ownership of a file
  293. Given user "user0" exists
  294. And user "user1" exists
  295. And User "user0" uploads file "data/textfile.txt" to "/somefile.txt"
  296. When transferring ownership of path "somefile.txt" from "user0" to "user1"
  297. And the command was successful
  298. And As an "user1"
  299. And using received transfer folder of "user1" as dav path
  300. Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
  301. And using old dav path
  302. And as "user0" the file "/somefile.txt" does not exist
  303. And using received transfer folder of "user1" as dav path
  304. And as "user1" the file "/somefile.txt" exists
  305. Scenario: transferring ownership of a folder
  306. Given user "user0" exists
  307. And user "user1" exists
  308. And User "user0" created a folder "/test"
  309. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  310. When transferring ownership of path "test" from "user0" to "user1"
  311. And the command was successful
  312. And As an "user1"
  313. And using received transfer folder of "user1" as dav path
  314. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  315. And using old dav path
  316. And as "user0" the folder "/test" does not exist
  317. And using received transfer folder of "user1" as dav path
  318. And as "user1" the folder "/test" exists
  319. Scenario: transferring ownership from user with risky display name
  320. Given user "user0" with displayname "user0 \"risky\"? ヂspḷay 'na|\/|e':.#" exists
  321. And user "user1" exists
  322. And User "user0" created a folder "/test"
  323. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  324. When transferring ownership of path "test" from "user0" to "user1"
  325. And the command was successful
  326. And As an "user1"
  327. And using received transfer folder of "user1" as dav path
  328. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  329. And transfer folder name contains "transferred from user0 -risky- ヂspḷay -na|-|e- on"
  330. And using old dav path
  331. And as "user0" the folder "/test" does not exist
  332. And using received transfer folder of "user1" as dav path
  333. And as "user1" the folder "/test" exists
  334. Scenario: transferring ownership of path does not affect other files
  335. Given user "user0" exists
  336. And user "user1" exists
  337. And User "user0" created a folder "/test"
  338. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  339. And User "user0" created a folder "/test2"
  340. And User "user0" uploads file "data/textfile.txt" to "/test2/somefile.txt"
  341. When transferring ownership of path "test" from "user0" to "user1"
  342. And the command was successful
  343. And As an "user1"
  344. And using received transfer folder of "user1" as dav path
  345. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  346. And using old dav path
  347. And as "user0" the folder "/test" does not exist
  348. And as "user0" the folder "/test2" exists
  349. And as "user0" the file "/test2/somefile.txt" exists
  350. And using received transfer folder of "user1" as dav path
  351. And as "user1" the folder "/test" exists
  352. And as "user1" the folder "/test2" does not exist
  353. Scenario: transferring ownership of path does not affect other shares
  354. Given user "user0" exists
  355. And user "user1" exists
  356. And User "user0" created a folder "/test"
  357. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  358. And User "user0" created a folder "/test2"
  359. And User "user0" uploads file "data/textfile.txt" to "/test2/sharedfile.txt"
  360. And file "/test2/sharedfile.txt" of user "user0" is shared with user "user1" with permissions 19
  361. And user "user1" accepts last share
  362. When transferring ownership of path "test" from "user0" to "user1"
  363. And the command was successful
  364. And As an "user1"
  365. And using received transfer folder of "user1" as dav path
  366. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  367. And using old dav path
  368. And as "user0" the folder "/test" does not exist
  369. And as "user0" the folder "/test2" exists
  370. And as "user0" the file "/test2/sharedfile.txt" exists
  371. And using received transfer folder of "user1" as dav path
  372. And as "user1" the folder "/test" exists
  373. And as "user1" the folder "/test2" does not exist
  374. And using old dav path
  375. And as "user1" the file "/sharedfile.txt" exists
  376. And As an "user1"
  377. And Getting info of last share
  378. And the OCS status code should be "100"
  379. And Share fields of last share match with
  380. | uid_owner | user0 |
  381. | uid_file_owner | user0 |
  382. | share_with | user1 |
  383. Scenario: transferring ownership of file shares
  384. Given user "user0" exists
  385. And user "user1" exists
  386. And user "user2" exists
  387. And User "user0" created a folder "/test"
  388. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  389. And file "/test/somefile.txt" of user "user0" is shared with user "user2" with permissions 19
  390. And user "user2" accepts last share
  391. When transferring ownership of path "test" from "user0" to "user1"
  392. And the command was successful
  393. And As an "user2"
  394. Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
  395. And using old dav path
  396. And as "user0" the folder "/test" does not exist
  397. And using received transfer folder of "user1" as dav path
  398. And as "user1" the folder "/test" exists
  399. And As an "user1"
  400. And Getting info of last share
  401. And the OCS status code should be "100"
  402. And Share fields of last share match with
  403. | uid_owner | user1 |
  404. | uid_file_owner | user1 |
  405. | share_with | user2 |
  406. Scenario: transferring ownership of folder shared with third user
  407. Given user "user0" exists
  408. And user "user1" exists
  409. And user "user2" exists
  410. And User "user0" created a folder "/test"
  411. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  412. And folder "/test" of user "user0" is shared with user "user2" with permissions 31
  413. And user "user2" accepts last share
  414. When transferring ownership of path "test" from "user0" to "user1"
  415. And the command was successful
  416. And As an "user2"
  417. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  418. And using old dav path
  419. And as "user0" the folder "/test" does not exist
  420. And using received transfer folder of "user1" as dav path
  421. And as "user1" the folder "/test" exists
  422. And As an "user1"
  423. And Getting info of last share
  424. And the OCS status code should be "100"
  425. And Share fields of last share match with
  426. | uid_owner | user1 |
  427. | uid_file_owner | user1 |
  428. | share_with | user2 |
  429. Scenario: transferring ownership of folder shared with transfer recipient
  430. Given user "user0" exists
  431. And user "user1" exists
  432. And User "user0" created a folder "/test"
  433. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  434. And folder "/test" of user "user0" is shared with user "user1" with permissions 31
  435. And user "user1" accepts last share
  436. When transferring ownership of path "test" from "user0" to "user1"
  437. And the command was successful
  438. And As an "user1"
  439. Then as "user1" the folder "/test" does not exist
  440. And using received transfer folder of "user1" as dav path
  441. And Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  442. And using old dav path
  443. And as "user0" the folder "/test" does not exist
  444. And using received transfer folder of "user1" as dav path
  445. And as "user1" the folder "/test" exists
  446. And Getting info of last share
  447. And the OCS status code should be "404"
  448. Scenario: transferring ownership of folder doubly shared with third user
  449. Given group "group1" exists
  450. And user "user0" exists
  451. And user "user1" exists
  452. And user "user2" exists
  453. And user "user2" belongs to group "group1"
  454. And User "user0" created a folder "/test"
  455. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  456. And folder "/test" of user "user0" is shared with group "group1" with permissions 31
  457. And user "user2" accepts last share
  458. And folder "/test" of user "user0" is shared with user "user2" with permissions 31
  459. And user "user2" accepts last share
  460. When transferring ownership of path "test" from "user0" to "user1"
  461. And the command was successful
  462. And As an "user2"
  463. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  464. And using old dav path
  465. And as "user0" the folder "/test" does not exist
  466. And using received transfer folder of "user1" as dav path
  467. And as "user1" the folder "/test" exists
  468. And As an "user1"
  469. And Getting info of last share
  470. And the OCS status code should be "100"
  471. And Share fields of last share match with
  472. | uid_owner | user1 |
  473. | uid_file_owner | user1 |
  474. | share_with | user2 |
  475. Scenario: transferring ownership of path fails for reshares
  476. Given user "user0" exists
  477. And user "user1" exists
  478. And user "user2" exists
  479. And user "user3" exists
  480. And User "user3" created a folder "/test"
  481. And User "user3" uploads file "data/textfile.txt" to "/test/somefile.txt"
  482. And folder "/test" of user "user3" is shared with user "user0" with permissions 31
  483. And user "user0" accepts last share
  484. And folder "/test" of user "user0" is shared with user "user2" with permissions 31
  485. And user "user2" accepts last share
  486. When transferring ownership of path "test" from "user0" to "user1"
  487. Then the command failed with exit code 1
  488. And the command output contains the text "Could not transfer files."
  489. Scenario: transferring ownership does not transfer received shares
  490. Given user "user0" exists
  491. And user "user1" exists
  492. And user "user2" exists
  493. And User "user2" created a folder "/test"
  494. And User "user0" created a folder "/sub"
  495. And folder "/test" of user "user2" is shared with user "user0" with permissions 31
  496. And user "user0" accepts last share
  497. And User "user0" moved folder "/test" to "/sub/test"
  498. When transferring ownership of path "sub" from "user0" to "user1"
  499. And the command was successful
  500. And As an "user1"
  501. And using received transfer folder of "user1" as dav path
  502. Then as "user1" the folder "/sub" exists
  503. And as "user1" the folder "/sub/test" does not exist
  504. And using old dav path
  505. And as "user0" the folder "/sub" does not exist
  506. And Getting info of last share
  507. And the OCS status code should be "404"
  508. Scenario: transferring ownership transfers received shares into subdir when requested
  509. Given user "user0" exists
  510. And user "user1" exists
  511. And user "user2" exists
  512. And User "user2" created a folder "/transfer-share"
  513. And User "user2" created a folder "/do-not-transfer"
  514. And User "user0" created a folder "/sub"
  515. And folder "/transfer-share" of user "user2" is shared with user "user0" with permissions 31
  516. And user "user0" accepts last share
  517. And User "user0" moved folder "/transfer-share" to "/sub/transfer-share"
  518. And folder "/do-not-transfer" of user "user2" is shared with user "user0" with permissions 31
  519. And user "user0" accepts last share
  520. When transferring ownership of path "sub" from "user0" to "user1" with received shares
  521. And the command was successful
  522. And As an "user1"
  523. And using received transfer folder of "user1" as dav path
  524. Then as "user1" the folder "/sub" exists
  525. And as "user1" the folder "/do-not-transfer" does not exist
  526. And as "user1" the folder "/sub/do-not-transfer" does not exist
  527. And as "user1" the folder "/sub/transfer-share" exists
  528. And using old dav path
  529. And as "user1" the folder "/transfer-share" does not exist
  530. And as "user1" the folder "/do-not-transfer" does not exist
  531. And using old dav path
  532. And as "user0" the folder "/sub" does not exist
  533. And as "user0" the folder "/do-not-transfer" exists
  534. And Getting info of last share
  535. And the OCS status code should be "404"
  536. Scenario: transferring ownership does not transfer external storage
  537. Given user "user0" exists
  538. And user "user1" exists
  539. And User "user0" created a folder "/sub"
  540. When transferring ownership of path "sub" from "user0" to "user1"
  541. And the command was successful
  542. And As an "user1"
  543. And using received transfer folder of "user1" as dav path
  544. Then as "user1" the folder "/local_storage" does not exist
  545. Scenario: transferring ownership fails with invalid source user
  546. Given user "user0" exists
  547. And User "user0" created a folder "/sub"
  548. When transferring ownership of path "sub" from "invalid_user" to "user0"
  549. Then the command output contains the text "Unknown source user"
  550. And the command failed with exit code 1
  551. Scenario: transferring ownership fails with invalid target user
  552. Given user "user0" exists
  553. And User "user0" created a folder "/sub"
  554. When transferring ownership of path "sub" from "user0" to "invalid_user"
  555. Then the command output contains the text "Unknown destination user invalid_user"
  556. And the command failed with exit code 1
  557. Scenario: transferring ownership fails with invalid path
  558. Given user "user0" exists
  559. And user "user1" exists
  560. When transferring ownership of path "test" from "user0" to "user1"
  561. Then the command output contains the text "Unknown path provided: test"
  562. And the command failed with exit code 1