2023-10-27 14:45:15 +02:00
Feature: lock files
As a user
I want to lock files
Background:
Given these users have been created with default attributes and without skeleton files:
| 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 "
2024-03-13 14:26:37 +05:45
When user " Alice " sends PROPFIND request from the space " Alice Hansen " to the resource " textfile.txt " with depth " 0 " using the WebDAV API
2023-10-27 14:45:15 +02:00
Then the HTTP status code should be " 207 "
And the " PROPFIND " response to user " Alice " should contain a space " Alice Hansen " 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 "
2024-03-13 14:26:37 +05:45
When user " Alice " sends PROPFIND request from the space " Alice Hansen " to the resource " textfile.txt " with depth " 0 " using the WebDAV API
2023-10-27 14:45:15 +02:00
Then the HTTP status code should be " 207 "
And the " PROPFIND " response to user " Alice " should contain a space " Alice Hansen " 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 Outline: lock a file using file-id
Given user " Alice " has uploaded a file inside space " Alice Hansen " with content " some content " to " textfile.txt "
And we save it into " FILEID "
2023-11-01 06:02:08 +01:00
When user " Alice " locks file " textfile.txt " using file-id path " <dav-path> " using the WebDAV API setting the following properties
2023-10-27 14:45:15 +02:00
| lockscope | exclusive |
| timeout | Second-3600 |
Then the HTTP status code should be " 200 "
2024-03-13 14:26:37 +05:45
When user " Alice " sends PROPFIND request from the space " Alice Hansen " to the resource " textfile.txt " with depth " 0 " using the WebDAV API
2023-10-27 14:45:15 +02:00
Then the HTTP status code should be " 207 "
And the " PROPFIND " response to user " Alice " should contain a space " Alice Hansen " 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 |
Examples:
| dav-path |
| /remote.php/dav/spaces/ <<FILEID> > |
| /dav/spaces/ <<FILEID> > |
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
2023-10-30 17:57:42 +05:45
And user " Alice " has created a space " Project " with the default quota using the Graph API
2023-10-27 14:45:15 +02:00
And user " Alice " has uploaded a file inside space " Project " with content " some content " to " textfile.txt "
2024-05-09 14:07:33 +05:45
And user " Alice " has sent the following space share invitation:
| space | Project |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
2023-10-27 14:45:15 +02:00
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 "
2024-03-13 14:26:37 +05:45
When user " Brian " sends PROPFIND request from the space " Project " to the resource " textfile.txt " with depth " 0 " using the WebDAV API
2023-10-27 14:45:15 +02:00
Then the HTTP status code should be " 207 "
And the " PROPFIND " response to user " Brian " should contain a space " Project " 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:
2024-05-09 14:07:33 +05:45
| space-role |
| Manager |
| Space Editor |
2023-10-27 14:45:15 +02:00
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
2023-10-30 17:57:42 +05:45
And user " Alice " has created a space " Project " with the default quota using the Graph API
2023-10-27 14:45:15 +02:00
And user " Alice " has uploaded a file inside space " Project " with content " some content " to " textfile.txt "
And we save it into " FILEID "
2024-05-09 14:07:33 +05:45
And user " Alice " has sent the following space share invitation:
| space | Project |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
2023-11-01 06:02:08 +01:00
When user " Brian " locks file " textfile.txt " using file-id path " <dav-path> " using the WebDAV API setting the following properties
2023-10-27 14:45:15 +02:00
| lockscope | exclusive |
| timeout | Second-3600 |
Then the HTTP status code should be " 200 "
2024-03-13 14:26:37 +05:45
When user " Brian " sends PROPFIND request from the space " Project " to the resource " textfile.txt " with depth " 0 " using the WebDAV API
2023-10-27 14:45:15 +02:00
Then the HTTP status code should be " 207 "
And the " PROPFIND " response to user " Brian " should contain a space " Project " 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:
2024-05-09 14:07:33 +05:45
| space-role | dav-path |
| Manager | /remote.php/dav/spaces/ <<FILEID> > |
| Space Editor | /dav/spaces/ <<FILEID> > |
2023-10-27 14:45:15 +02:00
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
2023-10-30 17:57:42 +05:45
And user " Alice " has created a space " Project " with the default quota using the Graph API
2023-10-27 14:45:15 +02:00
And user " Alice " has uploaded a file inside space " Project " with content " some content " to " textfile.txt "
And we save it into " FILEID "
2024-05-09 14:07:33 +05:45
And user " Alice " has sent the following space share invitation:
| space | Project |
| sharee | Brian |
| shareType | user |
| permissionsRole | Space Viewer |
2023-11-01 06:02:08 +01:00
When user " Brian " tries to lock file " textfile.txt " using file-id path " /dav/spaces/ <<FILEID> > " using the WebDAV API setting the following properties
2023-10-27 14:45:15 +02:00
| lockscope | exclusive |
Then the HTTP status code should be " 403 "
2023-11-01 06:02:08 +01:00
When user " Brian " tries to lock file " textfile.txt " inside the space " Project " using the WebDAV API setting the following properties
2023-10-27 14:45:15 +02:00
| lockscope | exclusive |
Then the HTTP status code should be " 403 "
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 "
2024-05-09 14:07:33 +05:45
And user " Alice " has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
2023-10-27 14:45:15 +02:00
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 "
2024-03-13 14:26:37 +05:45
When user " Alice " sends PROPFIND request from the space " Alice Hansen " to the resource " textfile.txt " with depth " 0 " using the WebDAV API
2023-10-27 14:45:15 +02:00
Then the HTTP status code should be " 207 "
And the " PROPFIND " response to user " Alice " should contain a space " Alice Hansen " 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 Outline: lock a file in the shares using file-id
Given user " Alice " has uploaded a file inside space " Alice Hansen " with content " some content " to " textfile.txt "
And we save it into " FILEID "
2024-05-09 14:07:33 +05:45
And user " Alice " has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
2023-11-01 06:02:08 +01:00
When user " Brian " locks file " textfile.txt " using file-id path " <dav-path> " using the WebDAV API setting the following properties
2023-10-27 14:45:15 +02:00
| lockscope | exclusive |
| timeout | Second-3600 |
Then the HTTP status code should be " 200 "
2024-03-13 14:26:37 +05:45
When user " Alice " sends PROPFIND request from the space " Alice Hansen " to the resource " textfile.txt " with depth " 0 " using the WebDAV API
2023-10-27 14:45:15 +02:00
Then the HTTP status code should be " 207 "
And the " PROPFIND " response to user " Alice " should contain a space " Alice Hansen " 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 |
| /remote.php/dav/spaces/ <<FILEID> > |
| /dav/spaces/ <<FILEID> > |
2023-10-30 17:57:42 +05:45
2024-06-12 10:44:21 +05:45
Scenario Outline: viewer cannot lock a file in the shares using file-id
2023-10-27 14:45:15 +02:00
Given user " Alice " has uploaded a file inside space " Alice Hansen " with content " some content " to " textfile.txt "
And we save it into " FILEID "
2024-05-09 14:07:33 +05:45
And user " Alice " has sent the following resource share invitation:
2024-06-12 10:44:21 +05:45
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
2023-11-01 06:02:08 +01:00
When user " Brian " tries to lock file " textfile.txt " using file-id path " /dav/spaces/ <<FILEID> > " using the WebDAV API setting the following properties
| lockscope | exclusive |
2023-10-27 14:45:15 +02:00
Then the HTTP status code should be " 403 "
2024-06-12 10:44:21 +05:45
Examples:
| permissions-role |
| Viewer |
| Secure viewer |
2023-11-01 06:02:08 +01:00
Scenario: sharee cannot lock a resource exclusively locked by a sharer
Given user " Alice " has uploaded a file inside space " Alice Hansen " with content " some content " to " textfile.txt "
And we save it into " FILEID "
2024-05-09 14:07:33 +05:45
And user " Alice " has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
2023-11-01 06:02:08 +01:00
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 path " /dav/spaces/ <<FILEID> > " using the WebDAV API setting the following properties
| lockscope | exclusive |
| timeout | Second-3600 |
Then the HTTP status code should be " 423 "
2024-03-13 14:26:37 +05:45
When user " Alice " sends PROPFIND request from the space " Alice Hansen " to the resource " textfile.txt " with depth " 0 " using the WebDAV API
2023-11-01 06:02:08 +01:00
Then the HTTP status code should be " 207 "
And the " PROPFIND " response to user " Alice " should contain a space " Alice Hansen " 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 user " Alice " has uploaded a file inside space " Alice Hansen " with content " some content " to " textfile.txt "
And we save it into " FILEID "
2024-05-09 14:07:33 +05:45
And user " Alice " has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
2023-11-01 06:02:08 +01:00
And user " Brian " has locked file " textfile.txt " using file-id path " /dav/spaces/ <<FILEID> > " setting the following properties
| lockscope | exclusive |
When user " Alice " tries to lock file " textfile.txt " using file-id path " /dav/spaces/ <<FILEID> > " using the WebDAV API setting the following properties
| lockscope | exclusive |
| timeout | Second-3600 |
Then the HTTP status code should be " 423 "
2024-03-13 14:26:37 +05:45
When user " Alice " sends PROPFIND request from the space " Alice Hansen " to the resource " textfile.txt " with depth " 0 " using the WebDAV API
2023-11-01 06:02:08 +01:00
Then the HTTP status code should be " 207 "
And the " PROPFIND " response to user " Alice " should contain a space " Alice Hansen " with these key and value pairs:
| key | value |
| d:lockdiscovery/d:activelock/d:lockscope/d:exclusive | |
| d:lockdiscovery/d:activelock/oc:ownername | Brian Murphy |
2023-11-17 16:22:12 +05:45
@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 "
2024-05-09 14:07:33 +05:45
And user " Alice " has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
2023-11-17 16:22:12 +05:45
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 without skeleton files
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 "
2024-05-09 14:07:33 +05:45
And user " Alice " has sent the following resource share invitation:
| resource | FromAlice |
| space | Personal |
| sharee | Carol |
| shareType | user |
| permissionsRole | Editor |
And user " Brian " has sent the following resource share invitation:
| resource | FromBrian |
| space | Personal |
| sharee | Carol |
| shareType | user |
| permissionsRole | Editor |
2023-11-17 16:22:12 +05:45
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 "
2024-05-09 14:07:33 +05:45
And user " Alice " has sent the following resource share invitation:
| resource | locked |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user " Alice " has sent the following resource share invitation:
| resource | notlocked |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
2023-11-17 16:22:12 +05:45
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 |
2023-11-22 15:37:29 +05:45
2023-11-27 16:39:47 +05:45
@issue-7641
Scenario Outline: try to lock a folder as anonymous user
Given using <dav-path-version> DAV path
2024-05-09 14:07:33 +05:45
And using SharingNG
2023-11-27 16:39:47 +05:45
And user " Alice " has created folder " PARENT "
And user " Alice " has uploaded file " filesForUpload/textfile.txt " to " PARENT/textfile0.txt "
2024-05-09 14:07:33 +05:45
And user " Alice " has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | edit |
| password | %public% |
2023-11-27 16:39:47 +05:45
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 |
2023-11-22 15:37:29 +05:45
2024-05-09 14:07:33 +05:45
2023-11-22 15:37:29 +05:45
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 |
2023-11-27 16:39:47 +05:45
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
2024-05-09 14:07:33 +05:45
And using SharingNG
2023-11-27 16:39:47 +05:45
And user " Alice " has created folder " PARENT "
And user " Alice " has uploaded file " filesForUpload/textfile.txt " to " PARENT/textfile0.txt "
2024-05-09 14:07:33 +05:45
And user " Alice " has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | edit |
| password | %public% |
2023-11-27 16:39:47 +05:45
When the public locks " textfile0.txt " in the last public link shared folder using the new 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 |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |
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
2024-05-09 14:07:33 +05:45
And using SharingNG
2023-11-27 16:39:47 +05:45
And user " Alice " has created folder " PARENT "
And user " Alice " has uploaded file " filesForUpload/textfile.txt " to " PARENT/textfile0.txt "
2024-05-09 14:07:33 +05:45
And user " Alice " has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | view |
| password | %public% |
2023-11-27 16:39:47 +05:45
When the public tries to lock " textfile0.txt " in the last public link shared folder using the new 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 |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |
Scenario Outline: lock a file shared by a link as anonymous user with edit permission
Given using <dav-path-version> DAV path
2024-05-09 14:07:33 +05:45
And using SharingNG
2023-11-27 16:39:47 +05:45
And user " Alice " has uploaded file " filesForUpload/textfile.txt " to " textfile0.txt "
2024-05-09 14:07:33 +05:45
And user " Alice " has created the following resource link share:
| resource | textfile0.txt |
| space | Personal |
| permissionsRole | edit |
| password | %public% |
2023-11-27 16:39:47 +05:45
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 |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |
Scenario Outline: try to lock a file shared by a link as anonymous user with read permission
Given using <dav-path-version> DAV path
2024-05-09 14:07:33 +05:45
And using SharingNG
2023-11-27 16:39:47 +05:45
And user " Alice " has uploaded file " filesForUpload/textfile.txt " to " textfile0.txt "
2024-05-09 14:07:33 +05:45
And user " Alice " has created the following resource link share:
| resource | textfile0.txt |
| space | Personal |
| permissionsRole | view |
| password | %public% |
2023-11-27 16:39:47 +05:45
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 |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |