-
Notifications
You must be signed in to change notification settings - Fork 189
/
Copy pathlockFiles.feature
557 lines (522 loc) · 29.3 KB
/
lockFiles.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
Feature: lock files
As a user
I want to lock files
Background:
Given these users have been created with default attributes:
| username |
| Alice |
| Brian |
Scenario Outline: lock a file
Given using <dav-path-version> DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
When user "Alice" locks file "textfile.txt" using the WebDAV API setting the following properties
| lockscope | exclusive |
Then the HTTP status code should be "200"
When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "textfile.txt" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a resource "textfile.txt" with these key and value pairs:
| key | value |
| d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | |
| d:lockdiscovery/d:activelock/d:depth | Infinity |
| d:lockdiscovery/d:activelock/d:timeout | Infinity |
| d:lockdiscovery/d:activelock/oc:ownername | Alice Hansen |
Examples:
| dav-path-version |
| old |
| new |
| spaces |
Scenario Outline: lock a file with a timeout
Given using <dav-path-version> DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
When user "Alice" locks file "textfile.txt" using the WebDAV API setting the following properties
| lockscope | exclusive |
| timeout | Second-5000 |
Then the HTTP status code should be "200"
When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "textfile.txt" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a resource "textfile.txt" with these key and value pairs:
| key | value |
| d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | |
| d:lockdiscovery/d:activelock/d:depth | Infinity |
| d:lockdiscovery/d:activelock/d:timeout | Second-5000 |
| d:lockdiscovery/d:activelock/oc:ownername | Alice Hansen |
Examples:
| dav-path-version |
| old |
| new |
| spaces |
Scenario: lock a file using file-id
Given using spaces DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And we save it into "FILEID"
When user "Alice" locks file "textfile.txt" using file-id "<<FILEID>>" using the WebDAV API setting the following properties
| lockscope | exclusive |
| timeout | Second-3600 |
Then the HTTP status code should be "200"
When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "textfile.txt" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a resource "textfile.txt" with these key and value pairs:
| key | value |
| d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | |
| d:lockdiscovery/d:activelock/d:depth | Infinity |
| d:lockdiscovery/d:activelock/d:timeout | Second-3600 |
| d:lockdiscovery/d:activelock/oc:ownername | Alice Hansen |
Scenario Outline: user cannot lock file twice
Given using <dav-path-version> DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And user "Alice" has locked file "textfile.txt" setting the following properties
| lockscope | exclusive |
When user "Alice" tries to lock file "textfile.txt" using the WebDAV API setting the following properties
| lockscope | exclusive |
Then the HTTP status code should be "423"
Examples:
| dav-path-version |
| old |
| new |
| spaces |
Scenario Outline: lock a file in the project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And using spaces DAV path
And user "Alice" has created a space "Project" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "Project" with content "some content" to "textfile.txt"
And user "Alice" has sent the following space share invitation:
| space | Project |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
When user "Brian" locks file "textfile.txt" inside the space "Project" using the WebDAV API setting the following properties
| lockscope | exclusive |
| timeout | Second-3600 |
Then the HTTP status code should be "200"
When user "Brian" sends PROPFIND request from the space "Project" to the resource "textfile.txt" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a resource "textfile.txt" with these key and value pairs:
| key | value |
| d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | |
| d:lockdiscovery/d:activelock/d:depth | Infinity |
| d:lockdiscovery/d:activelock/d:timeout | Second-3600 |
| d:lockdiscovery/d:activelock/oc:ownername | Brian Murphy |
Examples:
| space-role |
| Manager |
| Space Editor |
Scenario Outline: lock a file in the project space using file-id
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And using spaces DAV path
And user "Alice" has created a space "Project" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "Project" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following space share invitation:
| space | Project |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
When user "Brian" locks file "textfile.txt" using file-id "<<FILEID>>" using the WebDAV API setting the following properties
| lockscope | exclusive |
| timeout | Second-3600 |
Then the HTTP status code should be "200"
When user "Brian" sends PROPFIND request from the space "Project" to the resource "textfile.txt" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a resource "textfile.txt" with these key and value pairs:
| key | value |
| d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | |
| d:lockdiscovery/d:activelock/d:depth | Infinity |
| d:lockdiscovery/d:activelock/d:timeout | Second-3600 |
| d:lockdiscovery/d:activelock/oc:ownername | Brian Murphy |
Examples:
| space-role |
| Manager |
| Space Editor |
Scenario: viewer cannot lock a file in the project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And using spaces DAV path
And user "Alice" has created a space "Project" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "Project" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following space share invitation:
| space | Project |
| sharee | Brian |
| shareType | user |
| permissionsRole | Space Viewer |
When user "Brian" tries to lock file "textfile.txt" using file-id "<<FILEID>>" using the WebDAV API setting the following properties
| lockscope | exclusive |
Then the HTTP status code should be "403"
When user "Brian" tries to lock file "textfile.txt" inside the space "Project" using the WebDAV API setting the following properties
| lockscope | exclusive |
Then the HTTP status code should be "403"
@issue-7599
Scenario Outline: lock a file in the shares
Given using <dav-path-version> DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile.txt" synced
When user "Brian" locks file "/Shares/textfile.txt" using the WebDAV API setting the following properties
| lockscope | exclusive |
Then the HTTP status code should be "200"
When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "textfile.txt" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a resource "textfile.txt" with these key and value pairs:
| key | value |
| d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | |
| d:lockdiscovery/d:activelock/oc:ownername | Brian Murphy |
Examples:
| dav-path-version |
| old |
| new |
| spaces |
Scenario: lock a file in the shares using file-id
Given using spaces DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile.txt" synced
When user "Brian" locks file "textfile.txt" using file-id "<<FILEID>>" using the WebDAV API setting the following properties
| lockscope | exclusive |
| timeout | Second-3600 |
Then the HTTP status code should be "200"
When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "textfile.txt" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a resource "textfile.txt" with these key and value pairs:
| key | value |
| d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | |
| d:lockdiscovery/d:activelock/oc:ownername | Brian Murphy |
@env-config
Scenario Outline: viewer cannot lock a file in the shares using file-id
Given using spaces DAV path
And the administrator has enabled the permissions role "Secure Viewer"
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
And user "Brian" has a share "textfile.txt" synced
When user "Brian" tries to lock file "textfile.txt" using file-id "<<FILEID>>" using the WebDAV API setting the following properties
| lockscope | exclusive |
Then the HTTP status code should be "403"
Examples:
| permissions-role |
| Viewer |
| Secure Viewer |
Scenario: sharee cannot lock a resource exclusively locked by a sharer
Given using spaces DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile.txt" synced
And user "Alice" has locked file "textfile.txt" setting the following properties
| lockscope | exclusive |
When user "Brian" tries to lock file "textfile.txt" using file-id "<<FILEID>>" using the WebDAV API setting the following properties
| lockscope | exclusive |
| timeout | Second-3600 |
Then the HTTP status code should be "423"
When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "textfile.txt" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a resource "textfile.txt" with these key and value pairs:
| key | value |
| d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | |
| d:lockdiscovery/d:activelock/oc:ownername | Alice Hansen |
Scenario: sharer cannot lock a resource exclusively locked by a sharee
Given using spaces DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile.txt" synced
And user "Brian" has locked file "textfile.txt" using file-id "<<FILEID>>" setting the following properties
| lockscope | exclusive |
When user "Alice" tries to lock file "textfile.txt" using file-id "<<FILEID>>" using the WebDAV API setting the following properties
| lockscope | exclusive |
| timeout | Second-3600 |
Then the HTTP status code should be "423"
When user "Alice" sends PROPFIND request from the space "Alice Hansen" to the resource "textfile.txt" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a resource "textfile.txt" with these key and value pairs:
| key | value |
| d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | |
| d:lockdiscovery/d:activelock/oc:ownername | Brian Murphy |
@issue-7599
Scenario Outline: two users having both a shared lock can use the resource
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "some data" to "textfile0.txt"
And user "Brian" has uploaded file with content "some data" to "textfile0.txt"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile0.txt" synced
And user "Alice" has locked file "textfile0.txt" setting the following properties
| lockscope | shared |
And user "Brian" has locked file "Shares/textfile0.txt" setting the following properties
| lockscope | shared |
When user "Alice" uploads file with content "from user 0" to "textfile0.txt" sending the locktoken of file "textfile0.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "textfile0.txt" for user "Alice" should be "from user 0"
And the content of file "Shares/textfile0.txt" for user "Brian" should be "from user 0"
When user "Brian" uploads file with content "from user 1" to "Shares/textfile0.txt" sending the locktoken of file "Shares/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "textfile0.txt" for user "Alice" should be "from user 1"
And the content of file "Shares/textfile0.txt" for user "Brian" should be "from user 1"
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@issue-7638
Scenario Outline: locking a file does not lock other items with the same name in other parts of the file system
Given using <dav-path-version> DAV path
And user "Alice" has created folder "locked"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/locked/textfile0.txt"
And user "Alice" has created folder "notlocked"
And user "Alice" has created folder "notlocked/textfile0.txt"
When user "Alice" locks file "locked/textfile0.txt" using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "200"
And user "Alice" should be able to upload file "filesForUpload/lorem.txt" to "/notlocked/textfile0.txt/real-file.txt"
And user "Alice" should be able to upload file "filesForUpload/lorem.txt" to "/textfile0.txt"
But user "Alice" should not be able to upload file "filesForUpload/lorem.txt" to "/locked/textfile0.txt"
Examples:
| dav-path-version | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |
@issue-7638 @issue-7599
Scenario Outline: locking a file in a received share does not lock other items with the same name in other received shares (shares from different users)
Given using <dav-path-version> DAV path
And user "Carol" has been created with default attributes
And user "Alice" has created folder "FromAlice"
And user "Brian" has created folder "FromBrian"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/FromAlice/textfile0.txt"
And user "Brian" has uploaded file "filesForUpload/textfile.txt" to "/FromBrian/textfile0.txt"
And user "Alice" has sent the following resource share invitation:
| resource | FromAlice |
| space | Personal |
| sharee | Carol |
| shareType | user |
| permissionsRole | Editor |
And user "Carol" has a share "FromAlice" synced
And user "Brian" has sent the following resource share invitation:
| resource | FromBrian |
| space | Personal |
| sharee | Carol |
| shareType | user |
| permissionsRole | Editor |
And user "Carol" has a share "FromBrian" synced
When user "Carol" locks file "/Shares/FromBrian/textfile0.txt" using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "200"
And user "Carol" should be able to upload file "filesForUpload/lorem.txt" to "/Shares/FromAlice/textfile0.txt"
But user "Carol" should not be able to upload file "filesForUpload/lorem.txt" to "/Shares/FromBrian/textfile0.txt"
Examples:
| dav-path-version | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |
@issue-7638 @issue-7599
Scenario Outline: locking a file in a received share does not lock other items with the same name in other received shares (shares from same user)
Given using <dav-path-version> DAV path
And user "Alice" has created folder "locked/"
And user "Alice" has created folder "notlocked/"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/locked/textfile0.txt"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/notlocked/textfile0.txt"
And user "Alice" has sent the following resource share invitation:
| resource | locked |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "locked" synced
And user "Alice" has sent the following resource share invitation:
| resource | notlocked |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "notlocked" synced
When user "Brian" locks file "/Shares/locked/textfile0.txt" using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "200"
And user "Brian" should be able to upload file "filesForUpload/lorem.txt" to "/Shares/notlocked/textfile0.txt"
But user "Brian" should not be able to upload file "filesForUpload/lorem.txt" to "/Shares/locked/textfile0.txt"
Examples:
| dav-path-version | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |
@issue-7641
Scenario Outline: try to lock a folder
Given using <dav-path-version> DAV path
And user "Alice" has created folder "locked/"
When user "Alice" tries to lock folder "locked/" using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "403"
And user "Alice" should be able to upload file "filesForUpload/lorem.txt" to "locked/textfile0.txt"
And user "Alice" should be able to create folder "/locked/sub-folder"
Examples:
| dav-path-version | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |
@issue-7641 @issue-10331
Scenario Outline: try to lock a folder as anonymous user
Given using <dav-path-version> DAV path
And using SharingNG
And user "Alice" has created folder "PARENT"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "PARENT/textfile0.txt"
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | edit |
| password | %public% |
When the public locks the last public link shared file using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "403"
And 0 locks should be reported for file "PARENT" of user "Alice" by the WebDAV API
And user "Alice" should be able to upload file "filesForUpload/lorem.txt" to "PARENT/textfile0.txt"
And user "Alice" should be able to create folder "/PARENT/sub-folder"
Examples:
| dav-path-version | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |
Scenario Outline: lock expiration
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "textfile0.txt"
And user "Alice" has locked file "textfile0.txt" setting the following properties
| lockscope | <lock-scope> |
| timeout | Second-5 |
When the user waits for "5" seconds to expire the lock
Then user "Alice" should be able to upload file "filesForUpload/lorem.txt" to "textfile0.txt"
And 0 locks should be reported for file "textfile0.txt" of user "Alice" by the WebDAV API
Examples:
| dav-path-version | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |
@issue-10331
Scenario Outline: lock a file inside a folder shared by a link as anonymous user with edit permission
Given using <dav-path-version> DAV path
And using SharingNG
And user "Alice" has created folder "PARENT"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "PARENT/textfile0.txt"
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | Edit |
| password | %public% |
When the public locks "textfile0.txt" in the last public link shared folder using the public WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "200"
And 1 locks should be reported for file "PARENT/textfile0.txt" of user "Alice" by the WebDAV API
And user "Alice" should not be able to upload file "filesForUpload/lorem.txt" to "PARENT/textfile0.txt"
Examples:
| dav-path-version | lock-scope |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |
@issue-10331
Scenario Outline: try to lock a file inside a folder shared by a link as anonymous user with read permission
Given using <dav-path-version> DAV path
And using SharingNG
And user "Alice" has created folder "PARENT"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "PARENT/textfile0.txt"
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | View |
| password | %public% |
When the public tries to lock "textfile0.txt" in the last public link shared folder using the public WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "403"
And 0 locks should be reported for file "PARENT/textfile0.txt" of user "Alice" by the WebDAV API
And user "Alice" should be able to upload file "filesForUpload/lorem.txt" to "PARENT/textfile0.txt"
Examples:
| dav-path-version | lock-scope |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |
@issue-7790 @issue-10331
Scenario Outline: lock a file shared by a link as anonymous user with edit permission
Given using <dav-path-version> DAV path
And using SharingNG
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "textfile0.txt"
And user "Alice" has created the following resource link share:
| resource | textfile0.txt |
| space | Personal |
| permissionsRole | edit |
| password | %public% |
When the public locks the last public link shared file using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "200"
And 1 locks should be reported for file "textfile0.txt" of user "Alice" by the WebDAV API
And user "Alice" should not be able to upload file "filesForUpload/lorem.txt" to "textfile0.txt"
Examples:
| dav-path-version | lock-scope |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |
@issue-7790 @issue-10331
Scenario Outline: try to lock a file shared by a link as anonymous user with read permission
Given using <dav-path-version> DAV path
And using SharingNG
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "textfile0.txt"
And user "Alice" has created the following resource link share:
| resource | textfile0.txt |
| space | Personal |
| permissionsRole | view |
| password | %public% |
When the public tries to lock the last public link shared file using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "403"
And 0 locks should be reported for file "textfile0.txt" of user "Alice" by the WebDAV API
And user "Alice" should be able to upload file "filesForUpload/lorem.txt" to "textfile0.txt"
Examples:
| dav-path-version | lock-scope |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |