Merge pull request #11122 from owncloud/test/to-from-sharing-roles

[tests-only][full-ci] add test to check versions after changing roles to and from EditorWithVersions role
This commit is contained in:
Prashant Gurung authored and GitHub committed 2025-03-14 12:14:52 +05:45
commit 027ffc8227
1 file changed
+96
@@ -1194,3 +1194,99 @@ Feature: an user shares resources
}
}
"""
Scenario Outline: sharee checks versions after updating the permission role of a shared file from other roles to FileEditorWithVersions
Given using spaces DAV path
And the administrator has enabled the permissions role 'File Editor With Versions'
And user "Alice" has uploaded file with content "to share" 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 "Alice" has updated the last resource share with the following properties:
| permissionsRole | File Editor With Versions |
| space | Personal |
| resource | textfile.txt |
And user "Brian" has uploaded file with content "updated content" to "Shares/textfile.txt"
When user "Brian" gets the number of versions of file "textfile.txt" using file-id "<<FILEID>>"
Then the HTTP status code should be "207"
And the number of versions should be "1"
Examples:
| permissions-role |
| File Editor |
| Viewer |
Scenario Outline: sharee tries to check versions after updating the permission role of a shared file from FileEditorWithVersions to other roles
Given using spaces DAV path
And the administrator has enabled the permissions role 'File Editor With Versions'
And user "Alice" has uploaded file with content "to share" 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 With Versions |
And user "Brian" has uploaded file with content "updated content" to "Shares/textfile.txt"
And user "Alice" has updated the last resource share with the following properties:
| permissionsRole | <permissions-role> |
| space | Personal |
| resource | textfile.txt |
When user "Brian" tries to get versions of file "textfile.txt" from "Alice"
Then the HTTP status code should be "403"
Examples:
| permissions-role |
| File Editor |
| Viewer |
Scenario Outline: sharee checks versions after updating the permission role of the shared folder from other roles to EditorWithVersions
Given the administrator has enabled the permissions role 'Editor With Versions'
And user "Alice" has created folder "folderToShare"
And user "Alice" has uploaded file with content "to share" to "folderToShare/textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
And user "Alice" has updated the last resource share with the following properties:
| permissionsRole | Editor With Versions |
| space | Personal |
| resource | folderToShare |
And user "Brian" has uploaded file with content "updated content" to "Shares/folderToShare/textfile.txt"
When user "Brian" gets the number of versions of file "textfile.txt" using file-id "<<FILEID>>"
Then the HTTP status code should be "207"
And the number of versions should be "1"
Examples:
| permissions-role |
| Editor |
| Viewer |
Scenario Outline: sharee tries to check versions after updating the permission role of the shared folder from EditorWithVersions to other roles
Given the administrator has enabled the permissions role 'Editor With Versions'
And user "Alice" has created folder "folderToShare"
And user "Alice" has uploaded file with content "to share" to "folderToShare/textfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor With Versions |
And user "Brian" has uploaded file with content "updated content" to "Shares/folderToShare/textfile.txt"
And user "Alice" has updated the last resource share with the following properties:
| permissionsRole | <permissions-role> |
| space | Personal |
| resource | folderToShare |
When user "Brian" tries to get versions of file "folderToShare/textfile.txt" from "Alice"
Then the HTTP status code should be "403"
Examples:
| permissions-role |
| Editor |
| Viewer |