Merge pull request #8683 from owncloud/kebab-case-for-table-header

[full-ci] [tests-only] Used kebab case for example table header name
This commit is contained in:
Phil Davis
2024-03-19 10:32:44 +05:45
committed by GitHub
12 changed files with 268 additions and 268 deletions

View File

@@ -10,10 +10,10 @@ Feature: assign role
When user "Alice" tries to get all existing roles
Then the HTTP status code should be "<http-status-code>"
Examples:
| user-role | http-status-code |
| Admin | 201 |
| Space Admin | 201 |
| User | 201 |
| user-role | http-status-code |
| Admin | 201 |
| Space Admin | 201 |
| User | 201 |
@issue-5032
Scenario Outline: only admin user can see assignments list
@@ -22,10 +22,10 @@ Feature: assign role
When user "Alice" tries to get list of assignment
Then the HTTP status code should be "<http-status-code>"
Examples:
| user-role | http-status-code |
| Admin | 201 |
| Space Admin | 401 |
| User | 401 |
| user-role | http-status-code |
| Admin | 201 |
| Space Admin | 401 |
| User | 401 |
Scenario Outline: a user cannot change own role
@@ -35,13 +35,13 @@ Feature: assign role
Then the HTTP status code should be "400"
And user "Alice" should have the role "<user-role>"
Examples:
| user-role | desired-role |
| Admin | User |
| Admin | Space Admin |
| Space Admin | Admin |
| Space Admin | Space Admin |
| User | Admin |
| User | Space Admin |
| user-role | desired-role |
| Admin | User |
| Admin | Space Admin |
| Space Admin | Admin |
| Space Admin | Space Admin |
| User | Admin |
| User | Space Admin |
Scenario Outline: only admin user can change the role for another user
@@ -54,11 +54,11 @@ Feature: assign role
Then the HTTP status code should be "<http-status-code>"
And user "Brian" should have the role "<expected-role>"
Examples:
| user-role | desired-role | http-status-code | expected-role |
| Admin | User | 201 | User |
| Admin | Space Admin | 201 | Space Admin |
| Admin | Admin | 201 | Admin |
| Space Admin | Admin | 400 | User |
| Space Admin | Space Admin | 400 | User |
| User | Admin | 400 | User |
| User | Space Admin | 400 | User |
| user-role | desired-role | http-status-code | expected-role |
| Admin | User | 201 | User |
| Admin | Space Admin | 201 | Space Admin |
| Admin | Admin | 201 | Admin |
| Space Admin | Admin | 400 | User |
| Space Admin | Space Admin | 400 | User |
| User | Admin | 400 | User |
| User | Space Admin | 400 | User |

View File

@@ -95,14 +95,14 @@ Feature: antivirus
| permissions | change |
| expireDate | 2040-01-01T23:59:59+0100 |
| password | %public% |
When user "Alice" uploads file "filesForUpload/filesWithVirus/<filename>" to "/<newfilename>" using the WebDAV API
When user "Alice" uploads file "filesForUpload/filesWithVirus/<file-name>" to "/<new-file-name>" using the WebDAV API
Then the HTTP status code should be "201"
And user "Alice" should get a notification with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Alice" file "/uploadFolder/<newfilename>" should not exist
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
Examples:
| dav-path-version | filename | newfilename |
| dav-path-version | file-name | new-file-name |
| old | eicar.com | virusFile1.txt |
| old | eicar_com.zip | virusFile2.zip |
| new | eicar.com | virusFile1.txt |
@@ -121,14 +121,14 @@ Feature: antivirus
| password | newpasswd |
| expireDate | 2040-01-01T23:59:59+0100 |
| password | %public% |
When user "Alice" uploads file "filesForUpload/filesWithVirus/<filename>" to "/<newfilename>" using the WebDAV API
When user "Alice" uploads file "filesForUpload/filesWithVirus/<file-name>" to "/<new-file-name>" using the WebDAV API
Then the HTTP status code should be "201"
And user "Alice" should get a notification with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Alice" file "/uploadFolder/<newfilename>" should not exist
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
Examples:
| dav-path-version | filename | newfilename |
| dav-path-version | file-name | new-file-name |
| old | eicar.com | virusFile1.txt |
| old | eicar_com.zip | virusFile2.zip |
| new | eicar.com | virusFile1.txt |
@@ -142,15 +142,15 @@ Feature: antivirus
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "uploadFolder"
And user "Alice" has shared folder "uploadFolder" with user "Brian" with permissions "all"
When user "Brian" uploads file "filesForUpload/filesWithVirus/<filename>" to "/Shares/uploadFolder/<newfilename>" using the WebDAV API
When user "Brian" uploads file "filesForUpload/filesWithVirus/<file-name>" to "/Shares/uploadFolder/<new-file-name>" using the WebDAV API
Then the HTTP status code should be "201"
And user "Brian" should get a notification with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<newfilename>" should not exist
And as "Alice" file "/uploadFolder/<newfilename>" should not exist
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<new-file-name>" should not exist
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
Examples:
| dav-path-version | filename | newfilename |
| dav-path-version | file-name | new-file-name |
| old | eicar.com | virusFile1.txt |
| old | eicar_com.zip | virusFile2.zip |
| new | eicar.com | virusFile1.txt |
@@ -162,15 +162,15 @@ Feature: antivirus
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "uploadFolder"
And user "Alice" has shared folder "uploadFolder" with user "Brian" with permissions "all"
When user "Brian" uploads a file "filesForUpload/filesWithVirus/<filename>" to "/uploadFolder/<newfilename>" in space "Shares" using the WebDAV API
When user "Brian" uploads a file "filesForUpload/filesWithVirus/<file-name>" to "/uploadFolder/<new-file-name>" in space "Shares" using the WebDAV API
Then the HTTP status code should be "201"
And user "Brian" should get a notification with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<newfilename>" should not exist
And as "Alice" file "/uploadFolder/<newfilename>" should not exist
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<new-file-name>" should not exist
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
Examples:
| filename | newfilename |
| file-name | new-file-name |
| eicar.com | virusFile1.txt |
| eicar_com.zip | virusFile2.zip |
@@ -182,15 +182,15 @@ Feature: antivirus
And user "Brian" has been added to group "group1"
And user "Alice" has created folder "uploadFolder"
And user "Alice" has shared folder "uploadFolder" with group "group1"
When user "Brian" uploads file "filesForUpload/filesWithVirus/<filename>" to "/Shares/uploadFolder/<newfilename>" using the WebDAV API
When user "Brian" uploads file "filesForUpload/filesWithVirus/<file-name>" to "/Shares/uploadFolder/<new-file-name>" using the WebDAV API
Then the HTTP status code should be "201"
And user "Brian" should get a notification with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<newfilename>" should not exist
And as "Alice" file "/uploadFolder/<newfilename>" should not exist
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<new-file-name>" should not exist
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
Examples:
| dav-path-version | filename | newfilename |
| dav-path-version | file-name | new-file-name |
| old | eicar.com | virusFile1.txt |
| old | eicar_com.zip | virusFile2.zip |
| new | eicar.com | virusFile1.txt |
@@ -204,15 +204,15 @@ Feature: antivirus
And user "Brian" has been added to group "group1"
And user "Alice" has created folder "uploadFolder"
And user "Alice" has shared folder "uploadFolder" with group "group1"
When user "Brian" uploads a file "filesForUpload/filesWithVirus/<filename>" to "/uploadFolder/<newfilename>" in space "Shares" using the WebDAV API
When user "Brian" uploads a file "filesForUpload/filesWithVirus/<file-name>" to "/uploadFolder/<new-file-name>" in space "Shares" using the WebDAV API
Then the HTTP status code should be "201"
And user "Brian" should get a notification with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<newfilename>" should not exist
And as "Alice" file "/uploadFolder/<newfilename>" should not exist
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<new-file-name>" should not exist
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
Examples:
| filename | newfilename |
| file-name | new-file-name |
| eicar.com | virusFile1.txt |
| eicar_com.zip | virusFile2.zip |
@@ -222,22 +222,22 @@ Feature: antivirus
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has created a folder "uploadFolder" in space "new-space"
When user "Alice" uploads a file "filesForUpload/filesWithVirus/<filename>" to "/uploadFolder/<newfilename>" in space "new-space" using the WebDAV API
When user "Alice" uploads a file "filesForUpload/filesWithVirus/<file-name>" to "/uploadFolder/<new-file-name>" in space "new-space" using the WebDAV API
Then the HTTP status code should be "201"
And user "Alice" should get a notification for resource "<newfilename>" with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And user "Alice" should get a notification for resource "<new-file-name>" with subject "Virus found" and message:
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And for user "Alice" folder "uploadFolder" of the space "new-space" should not contain these entries:
| <newfilename> |
When user "Alice" uploads a file "filesForUpload/filesWithVirus/<filename>" to "/<newfilename>" in space "new-space" using the WebDAV API
| <new-file-name> |
When user "Alice" uploads a file "filesForUpload/filesWithVirus/<file-name>" to "/<new-file-name>" in space "new-space" using the WebDAV API
Then the HTTP status code should be "201"
And user "Alice" should get a notification for resource "<newfilename>" with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And user "Alice" should get a notification for resource "<new-file-name>" with subject "Virus found" and message:
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And for user "Alice" the space "new-space" should not contain these entries:
| /<newfilename> |
| /<new-file-name> |
Examples:
| filename | newfilename |
| file-name | new-file-name |
| eicar.com | virusFile1.txt |
| eicar_com.zip | virusFile2.zip |
@@ -250,17 +250,17 @@ Feature: antivirus
And user "Alice" has shared a space "new-space" with settings:
| shareWith | Brian |
| role | editor |
When user "Brian" uploads a file "/filesForUpload/filesWithVirus/<filename>" to "/<newfilename>" in space "new-space" using the WebDAV API
When user "Brian" uploads a file "/filesForUpload/filesWithVirus/<file-name>" to "/<new-file-name>" in space "new-space" using the WebDAV API
Then the HTTP status code should be "201"
And user "Brian" should get a notification with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And for user "Brian" the space "new-space" should not contain these entries:
| /<newfilename> |
| /<new-file-name> |
And for user "Alice" the space "new-space" should not contain these entries:
| /<newfilename> |
| /<new-file-name> |
Examples:
| filename | newfilename |
| file-name | new-file-name |
| eicar.com | virusFile1.txt |
| eicar_com.zip | virusFile2.zip |

View File

@@ -11,10 +11,10 @@ Feature: delay post-processing of uploaded files
@issue-5326
Scenario Outline: user sends GET request to the file while it's still being processed
Given user "Alice" has uploaded file with content "uploaded content" to "/file.txt"
When user "Alice" requests "<dav_path>" with "GET" without retrying
When user "Alice" requests "<dav-path>" with "GET" without retrying
Then the HTTP status code should be "425"
Examples:
| dav_path |
| dav-path |
| /remote.php/webdav/file.txt |
| /remote.php/dav/files/%username%/file.txt |
| /dav/spaces/%spaceid%/file.txt |
@@ -22,11 +22,11 @@ Feature: delay post-processing of uploaded files
Scenario Outline: user sends PROPFIND request to the file while it's still being processed
Given user "Alice" has uploaded file with content "uploaded content" to "/file.txt"
When user "Alice" requests "<dav_path>" with "PROPFIND" without retrying
When user "Alice" requests "<dav-path>" with "PROPFIND" without retrying
Then the HTTP status code should be "207"
And the value of the item "//d:response/d:propstat/d:status" in the response should be "HTTP/1.1 425 TOO EARLY"
Examples:
| dav_path |
| dav-path |
| /remote.php/webdav/file.txt |
| /remote.php/dav/files/%username%/file.txt |
| /dav/spaces/%spaceid%/file.txt |
@@ -35,12 +35,12 @@ Feature: delay post-processing of uploaded files
Scenario Outline: user sends PROPFIND request to the folder while files in the folder are still being processed
Given user "Alice" has created folder "my_data"
And user "Alice" has uploaded file with content "uploaded content" to "/my_data/file.txt"
When user "Alice" requests "<dav_path>" with "PROPFIND" without retrying
When user "Alice" requests "<dav-path>" with "PROPFIND" without retrying
Then the HTTP status code should be "207"
And as user "Alice" the value of the item "//d:status" of path "<dav_path>/" in the response should be "HTTP/1.1 200 OK"
And as user "Alice" the value of the item "//d:status" of path "<dav_path>/file.txt" in the response should be "HTTP/1.1 425 TOO EARLY"
And as user "Alice" the value of the item "//d:status" of path "<dav-path>/" in the response should be "HTTP/1.1 200 OK"
And as user "Alice" the value of the item "//d:status" of path "<dav-path>/file.txt" in the response should be "HTTP/1.1 425 TOO EARLY"
Examples:
| dav_path |
| dav-path |
| /remote.php/webdav/my_data |
| /remote.php/dav/files/%username%/my_data |
| /dav/spaces/%spaceid%/my_data |

View File

@@ -31,8 +31,8 @@ Feature: Propfind test
Scenario Outline: space member with a different role checks the PROPFIND request of a space
Given user "Alice" has uploaded a file inside space "new-space" with content "some content" to "testfile.txt"
And user "Alice" has shared a space "new-space" with settings:
| shareWith | Brian |
| role | <role> |
| shareWith | Brian |
| role | <space-role> |
When user "Brian" sends PROPFIND request to space "new-space" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And the following headers should match these regular expressions
@@ -41,21 +41,21 @@ Feature: Propfind test
| key | value |
| oc:fileid | UUIDof:new-space |
| oc:name | new-space |
| oc:permissions | <oc_permission> |
| oc:permissions | <oc-permission> |
| oc:privatelink | |
| oc:size | 12 |
Examples:
| role | oc_permission |
| manager | RDNVCKZP |
| editor | DNVCK |
| viewer | |
| space-role | oc-permission |
| manager | RDNVCKZP |
| editor | DNVCK |
| viewer | |
Scenario Outline: space member with a different role checks the PROPFIND request of the folder in the space
Given user "Alice" has created a folder "folderMain" in space "new-space"
And user "Alice" has shared a space "new-space" with settings:
| shareWith | Brian |
| role | <role> |
| shareWith | Brian |
| role | <space-role> |
When user "Brian" sends PROPFIND request from the space "new-space" to the resource "folderMain" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And the "PROPFIND" response should contain a space "new-space" with these key and value pairs:
@@ -63,20 +63,20 @@ Feature: Propfind test
| oc:fileid | UUIDof:folderMain |
| oc:file-parent | UUIDof:new-space |
| oc:name | folderMain |
| oc:permissions | <oc_permission> |
| oc:permissions | <oc-permission> |
| oc:size | 0 |
Examples:
| role | oc_permission |
| manager | RDNVCKZP |
| editor | DNVCK |
| viewer | |
| space-role | oc-permission |
| manager | RDNVCKZP |
| editor | DNVCK |
| viewer | |
Scenario Outline: space member with a different role checks the PROPFIND request of the sub-folder in the space
Given user "Alice" has created a folder "folderMain/subFolder1/subFolder2" in space "new-space"
And user "Alice" has shared a space "new-space" with settings:
| shareWith | Brian |
| role | <role> |
| shareWith | Brian |
| role | <space-role> |
When user "Brian" sends PROPFIND request from the space "new-space" to the resource "folderMain/subFolder1/subFolder2" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And the "PROPFIND" response should contain a space "new-space" with these key and value pairs:
@@ -84,20 +84,20 @@ Feature: Propfind test
| oc:fileid | UUIDof:folderMain/subFolder1/subFolder2 |
| oc:file-parent | UUIDof:folderMain/subFolder1 |
| oc:name | subFolder2 |
| oc:permissions | <oc_permission> |
| oc:permissions | <oc-permission> |
| oc:size | 0 |
Examples:
| role | oc_permission |
| manager | RDNVCKZP |
| editor | DNVCK |
| viewer | |
| space-role | oc-permission |
| manager | RDNVCKZP |
| editor | DNVCK |
| viewer | |
Scenario Outline: space member with a different role checks the PROPFIND request of the file in the space
Given user "Alice" has uploaded a file inside space "new-space" with content "some content" to "testfile.txt"
And user "Alice" has shared a space "new-space" with settings:
| shareWith | Brian |
| role | <role> |
| shareWith | Brian |
| role | <space-role> |
When user "Brian" sends PROPFIND request from the space "new-space" to the resource "testfile.txt" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And the "PROPFIND" response should contain a space "new-space" with these key and value pairs:
@@ -105,10 +105,10 @@ Feature: Propfind test
| oc:fileid | UUIDof:testfile.txt |
| oc:file-parent | UUIDof:new-space |
| oc:name | testfile.txt |
| oc:permissions | <oc_permission> |
| oc:permissions | <oc-permission> |
| oc:size | 12 |
Examples:
| role | oc_permission |
| manager | RDNVWZP |
| editor | DNVW |
| viewer | |
| space-role | oc-permission |
| manager | RDNVWZP |
| editor | DNVW |
| viewer | |

View File

@@ -11,32 +11,32 @@ Feature: CORS headers
@issue-5195
Scenario Outline: CORS headers should be returned when setting CORS domain sending origin header
Given using OCS API version "<ocs_api_version>"
Given using OCS API version "<ocs-api-version>"
When user "Alice" sends HTTP method "GET" to OCS API endpoint "<endpoint>" with headers
| header | value |
| Origin | https://aphno.badal |
Then the OCS status code should be "<ocs-code>"
And the HTTP status code should be "<http-code>"
Then the OCS status code should be "<ocs-status-code>"
And the HTTP status code should be "<http-status-code>"
And the following headers should be set
| header | value |
| Access-Control-Expose-Headers | Location |
| Access-Control-Allow-Origin | https://aphno.badal |
| Access-Control-Allow-Credentials | true |
Examples:
| ocs_api_version | endpoint | ocs-code | http-code |
| 1 | /config | 100 | 200 |
| 2 | /config | 200 | 200 |
| 1 | /apps/files_sharing/api/v1/shares | 100 | 200 |
| 2 | /apps/files_sharing/api/v1/shares | 200 | 200 |
| ocs-api-version | endpoint | ocs-status-code | http-status-code |
| 1 | /config | 100 | 200 |
| 2 | /config | 200 | 200 |
| 1 | /apps/files_sharing/api/v1/shares | 100 | 200 |
| 2 | /apps/files_sharing/api/v1/shares | 200 | 200 |
Scenario Outline: CORS headers should not be returned when CORS domain does not match origin header
Given using OCS API version "<ocs_api_version>"
Given using OCS API version "<ocs-api-version>"
When user "Alice" sends HTTP method "GET" to OCS API endpoint "<endpoint>" with headers
| header | value |
| Origin | https://mero.badal |
Then the OCS status code should be "<ocs-code>"
And the HTTP status code should be "<http-code>"
Then the OCS status code should be "<ocs-status-code>"
And the HTTP status code should be "<http-status-code>"
And the following headers should not be set
| header |
| Access-Control-Allow-Headers |
@@ -44,32 +44,32 @@ Feature: CORS headers
| Access-Control-Allow-Origin |
| Access-Control-Allow-Methods |
Examples:
| ocs_api_version | endpoint | ocs-code | http-code |
| 1 | /config | 100 | 200 |
| 2 | /config | 200 | 200 |
| 1 | /apps/files_sharing/api/v1/shares | 100 | 200 |
| 2 | /apps/files_sharing/api/v1/shares | 200 | 200 |
| ocs-api-version | endpoint | ocs-status-code | http-status-code |
| 1 | /config | 100 | 200 |
| 2 | /config | 200 | 200 |
| 1 | /apps/files_sharing/api/v1/shares | 100 | 200 |
| 2 | /apps/files_sharing/api/v1/shares | 200 | 200 |
@issue-5194
Scenario Outline: CORS headers should be returned when an preflight request is sent
Given using OCS API version "<ocs_api_version>"
Given using OCS API version "<ocs-api-version>"
When user "Alice" sends HTTP method "OPTIONS" to OCS API endpoint "<endpoint>" with headers
| header | value |
| Origin | https://aphno.badal |
| Access-Control-Request-Headers | Origin, Accept, Content-Type, Depth, Authorization, Ocs-Apirequest, If-None-Match, If-Match, Destination, Overwrite, X-Request-Id, X-Requested-With, Tus-Resumable, Tus-Checksum-Algorithm, Upload-Concat, Upload-Length, Upload-Metadata, Upload-Defer-Length, Upload-Expires, Upload-Checksum, Upload-Offset, X-Http-Method-Override, Cache-Control |
| Access-Control-Request-Method | <request_method> |
| Access-Control-Request-Method | <request-method> |
And the HTTP status code should be "204"
And the following headers should be set
| header | value |
| Access-Control-Allow-Headers | Origin, Accept, Content-Type, Depth, Authorization, Ocs-Apirequest, If-None-Match, If-Match, Destination, Overwrite, X-Request-Id, X-Requested-With, Tus-Resumable, Tus-Checksum-Algorithm, Upload-Concat, Upload-Length, Upload-Metadata, Upload-Defer-Length, Upload-Expires, Upload-Checksum, Upload-Offset, X-Http-Method-Override, Cache-Control |
| Access-Control-Allow-Origin | https://aphno.badal |
| Access-Control-Allow-Methods | <request_method> |
| Access-Control-Allow-Methods | <request-method> |
Examples:
| ocs_api_version | | endpoint | request_method |
| 1 | | /apps/files_sharing/api/v1/shares | GET |
| 2 | | /apps/files_sharing/api/v1/shares | PUT |
| 1 | | /apps/files_sharing/api/v1/shares | DELETE |
| 2 | | /apps/files_sharing/api/v1/shares | POST |
| ocs-api-version | endpoint | request-method |
| 1 | /apps/files_sharing/api/v1/shares | GET |
| 2 | /apps/files_sharing/api/v1/shares | PUT |
| 1 | /apps/files_sharing/api/v1/shares | DELETE |
| 2 | /apps/files_sharing/api/v1/shares | POST |
Scenario: CORS headers should be returned when setting CORS domain sending origin header in the Graph api

View File

@@ -31,7 +31,7 @@ Feature: Download space
Scenario Outline: user downloads a shared space (shared by others)
Given user "Alice" has shared a space "Project-space" with settings:
| shareWith | Brian |
| role | <role> |
| role | <space-role> |
When user "Brian" downloads the space "Project-space" using the WebDAV API
Then the HTTP status code should be "200"
And the downloaded "tar" archive should contain these files:
@@ -39,18 +39,18 @@ Feature: Download space
| file1.txt | some data |
| .space/readme.md | space description |
Examples:
| role |
| space-role |
| manager |
| editor |
| viewer |
Scenario Outline: admin/space-admin tries to download a space that they do not have access to
Given the administrator has assigned the role "<userRole>" to user "Brian" using the Graph API
Given the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
When user "Brian" tries to download the space "Project-space" owned by user "Alice" using the WebDAV API
Then the HTTP status code should be "404"
Examples:
| userRole |
| user-role |
| Admin |
| Space Admin |

View File

@@ -6,12 +6,12 @@ Feature: assign role
Scenario Outline: assign role to the user using graph api
Given user "Alice" has been created with default attributes and without skeleton files
And the administrator has assigned the role "<userRole>" to user "Alice" using the Graph API
And the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
When the administrator retrieves the assigned role of user "Alice" using the Graph API
Then the HTTP status code should be "200"
And the Graph API response should have the role "<userRole>"
And the Graph API response should have the role "<user-role>"
Examples:
| userRole |
| user-role |
| Admin |
| Space Admin |
| User |
@@ -20,26 +20,26 @@ Feature: assign role
@issue-5032
Scenario Outline: assign role to the user with graph api and list role with setting api
Given user "Alice" has been created with default attributes and without skeleton files
And the administrator has assigned the role "<userRole>" to user "Alice" using the Graph API
And the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
When user "Alice" tries to get list of assignment
Then the HTTP status code should be "<statusCode>"
And the setting API response should have the role "<userRole>"
Then the HTTP status code should be "<http-status-code>"
And the setting API response should have the role "<user-role>"
Examples:
| userRole | statusCode |
| Admin | 201 |
| Space Admin | 401 |
| User | 401 |
| User Light | 401 |
| user-role | http-status-code |
| Admin | 201 |
| Space Admin | 401 |
| User | 401 |
| User Light | 401 |
Scenario Outline: assign role to the user with setting api and list role with graph api
Given user "Alice" has been created with default attributes and without skeleton files
And the administrator has given "Alice" the role "<userRole>" using the settings api
And the administrator has given "Alice" the role "<user-role>" using the settings api
When the administrator retrieves the assigned role of user "Alice" using the Graph API
Then the HTTP status code should be "200"
And the Graph API response should have the role "<userRole>"
And the Graph API response should have the role "<user-role>"
Examples:
| userRole |
| user-role |
| Admin |
| Space Admin |
| User |

View File

@@ -10,51 +10,51 @@ Feature: change role
Scenario Outline: admin user changes the role of another user with different roles
Given user "Brian" has been created with default attributes and without skeleton files
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
And the administrator has assigned the role "<userRole>" to user "Brian" using the Graph API
When user "Alice" changes the role of user "Brian" to role "<newRole>" using the Graph API
And the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
When user "Alice" changes the role of user "Brian" to role "<new-user-role>" using the Graph API
Then the HTTP status code should be "201"
And user "Brian" should have the role "<newRole>"
And user "Brian" should have the role "<new-user-role>"
Examples:
| userRole | newRole |
| Admin | Admin |
| Admin | Space Admin |
| Admin | User |
| Admin | User Light |
| Space Admin | Admin |
| Space Admin | Space Admin |
| Space Admin | User |
| Space Admin | User Light |
| User | Admin |
| User | Space Admin |
| User | User |
| User | User Light |
| User Light | Admin |
| User Light | Space Admin |
| User Light | User |
| User Light | User Light |
| user-role | new-user-role |
| Admin | Admin |
| Admin | Space Admin |
| Admin | User |
| Admin | User Light |
| Space Admin | Admin |
| Space Admin | Space Admin |
| Space Admin | User |
| Space Admin | User Light |
| User | Admin |
| User | Space Admin |
| User | User |
| User | User Light |
| User Light | Admin |
| User Light | Space Admin |
| User Light | User |
| User Light | User Light |
Scenario Outline: admin user tries to change his/her own role
Given the administrator has assigned the role "Admin" to user "Alice" using the Graph API
When user "Alice" tries to change the role of user "Alice" to role "<newRole>" using the Graph API
When user "Alice" tries to change the role of user "Alice" to role "<new-user-role>" using the Graph API
Then the HTTP status code should be "403"
And user "Alice" should have the role "Admin"
Examples:
| newRole |
| Space Admin |
| User |
| User Light |
| Admin |
| new-user-role |
| Space Admin |
| User |
| User Light |
| Admin |
Scenario Outline: non-admin cannot change the user role
Given the administrator has assigned the role "<role>" to user "Alice" using the Graph API
Given the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
And user "Brian" has been created with default attributes and without skeleton files
When user "Alice" tries to change the role of user "Alice" to role "Admin" using the Graph API
Then the HTTP status code should be "401"
And user "Brian" should have the role "User"
Examples:
| role |
| user-role |
| Space Admin |
| User |
| User Light |

View File

@@ -1,16 +1,16 @@
@env-config
Feature: enforce password on public link
As a user
I want to enforce passwords on public links shared with upload, edit, or contribute permission
So that the password is required to access the contents of the link
As a user
I want to enforce passwords on public links shared with upload, edit, or contribute permission
So that the password is required to access the contents of the link
Password requirements. set by default:
| OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | true |
| OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 8 |
| OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 1 |
| OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 1 |
| OCIS_PASSWORD_POLICY_MIN_DIGITS | 1 |
| OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 1 |
Password requirements. set by default:
| OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | true |
| OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 8 |
| OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 1 |
| OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 1 |
| OCIS_PASSWORD_POLICY_MIN_DIGITS | 1 |
| OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 1 |
Scenario Outline: create a public link with edit permission without a password when enforce-password is enabled
@@ -24,13 +24,13 @@ Feature: enforce password on public link
When user "Alice" creates a public link share using the sharing API with settings
| path | /testfile.txt |
| permissions | 3 |
Then the HTTP status code should be "<http-code>"
Then the HTTP status code should be "<http-status-code>"
And the OCS status code should be "400"
And the OCS status message should be "missing required password"
Examples:
| ocs-api-version | http-code |
| 1 | 200 |
| 2 | 400 |
| ocs-api-version | http-status-code |
| 1 | 200 |
| 2 | 400 |
Scenario Outline: create a public link with viewer permission without a password when enforce-password is enabled
@@ -44,10 +44,10 @@ Feature: enforce password on public link
When user "Alice" creates a public link share using the sharing API with settings
| path | /testfile.txt |
| permissions | 1 |
Then the OCS status code should be "<ocs_status_code>"
Then the OCS status code should be "<ocs-status-code>"
And the HTTP status code should be "200"
Examples:
| ocs-api-version | ocs_status_code |
| ocs-api-version | ocs-status-code |
| 1 | 100 |
| 2 | 200 |
@@ -67,26 +67,26 @@ Feature: enforce password on public link
| permissions | 3 |
| password | %public% |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs-code>"
And the OCS status code should be "<ocs-status-code>"
And the OCS status message should be "OK"
And the public should not be able to download file "/textfile.txt" from inside the last public link shared folder using the new public WebDAV API without a password
And the public should not be able to download file "/textfile.txt" from inside the last public link shared folder using the new public WebDAV API with password "wrong pass"
But the public should be able to download file "/textfile.txt" from inside the last public link shared folder using the new public WebDAV API with password "%public%"
Examples:
| ocs-api-version | ocs-code |
| 1 | 100 |
| 2 | 200 |
| ocs-api-version | ocs-status-code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: create a public link with a password in accordance with the password policy
Given the following configs have been set:
| config | value |
| OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true |
| OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
| OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
| OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
| OCIS_PASSWORD_POLICY_MIN_DIGITS | 2 |
| OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 |
| OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
| OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
| OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
| OCIS_PASSWORD_POLICY_MIN_DIGITS | 2 |
| OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 |
And user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "test file" to "/testfile.txt"
And using OCS API version "<ocs-api-version>"
@@ -95,20 +95,20 @@ Feature: enforce password on public link
| permissions | 3 |
| password | 3s:5WW9uE5h=A |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs-code>"
And the OCS status code should be "<ocs-status-code>"
And the OCS status message should be "OK"
And the public should not be able to download file "/textfile.txt" from inside the last public link shared folder using the new public WebDAV API without a password
And the public should not be able to download file "/textfile.txt" from inside the last public link shared folder using the new public WebDAV API with password "wrong pass"
But the public should be able to download file "/textfile.txt" from inside the last public link shared folder using the new public WebDAV API with password "3s:5WW9uE5h=A"
Examples:
| ocs-api-version | ocs-code |
| 1 | 100 |
| 2 | 200 |
| ocs-api-version | ocs-status-code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: try to create a public link with a password that does not comply with the password policy
Given the following configs have been set:
| config | value |
| config | value |
| OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
| OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
| OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
@@ -121,7 +121,7 @@ Feature: enforce password on public link
| path | /testfile.txt |
| permissions | 3 |
| password | Pas1 |
Then the HTTP status code should be "<http-code>"
Then the HTTP status code should be "<http-status-code>"
And the OCS status code should be "400"
And the OCS status message should be:
"""
@@ -132,9 +132,9 @@ Feature: enforce password on public link
at least 2 special characters are required !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
"""
Examples:
| ocs-api-version | http-code |
| 1 | 200 |
| 2 | 400 |
| ocs-api-version | http-status-code |
| 1 | 200 |
| 2 | 400 |
Scenario Outline: update a public link with a password in accordance with the password policy
@@ -142,11 +142,11 @@ Feature: enforce password on public link
| config | value |
| OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true |
| OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
| OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
| OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
| OCIS_PASSWORD_POLICY_MIN_DIGITS | 1 |
| OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 |
| OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
| OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
| OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
| OCIS_PASSWORD_POLICY_MIN_DIGITS | 1 |
| OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 |
And user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "test file" to "/testfile.txt"
And using OCS API version "<ocs-api-version>"
@@ -157,15 +157,15 @@ Feature: enforce password on public link
| permissions | 3 |
| password | 6a0Q;A3 +i^m[ |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs-code>"
And the OCS status code should be "<ocs-status-code>"
And the OCS status message should be "OK"
And the public should not be able to download file "/textfile.txt" from inside the last public link shared folder using the new public WebDAV API without a password
And the public should not be able to download file "/textfile.txt" from inside the last public link shared folder using the new public WebDAV API with password "wrong pass"
But the public should be able to download file "/textfile.txt" from inside the last public link shared folder using the new public WebDAV API with password "6a0Q;A3 +i^m["
Examples:
| ocs-api-version | ocs-code |
| 1 | 100 |
| 2 | 200 |
| ocs-api-version | ocs-status-code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: try to update a public link with a password that does not comply with the password policy
@@ -173,11 +173,11 @@ Feature: enforce password on public link
| config | value |
| OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true |
| OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
| OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
| OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
| OCIS_PASSWORD_POLICY_MIN_DIGITS | 1 |
| OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 |
| OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
| OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
| OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
| OCIS_PASSWORD_POLICY_MIN_DIGITS | 1 |
| OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 |
And user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "test file" to "/testfile.txt"
And using OCS API version "<ocs-api-version>"
@@ -187,7 +187,7 @@ Feature: enforce password on public link
When user "Alice" updates the last public link share using the sharing API with
| permissions | 3 |
| password | Pws^ |
Then the HTTP status code should be "<http-code>"
Then the HTTP status code should be "<http-status-code>"
And the OCS status code should be "400"
And the OCS status message should be:
"""
@@ -198,9 +198,9 @@ Feature: enforce password on public link
at least 2 special characters are required !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
"""
Examples:
| ocs-api-version | http-code |
| 1 | 200 |
| 2 | 400 |
| ocs-api-version | http-status-code |
| 1 | 200 |
| 2 | 400 |
Scenario Outline: create a public link with a password in accordance with the password policy (valid cases)
@@ -219,7 +219,7 @@ Feature: enforce password on public link
And the public should not be able to download file "/textfile.txt" from inside the last public link shared folder using the new public WebDAV API with password "wrong pass"
But the public should be able to download file "/textfile.txt" from inside the last public link shared folder using the new public WebDAV API with password "<password>"
Examples:
| config | config-value | password |
| config | config-value | password |
| OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 4 | Ps-1 |
| OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 14 | Ps1:with space |
| OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 4 | PS1:test |
@@ -260,14 +260,14 @@ Feature: enforce password on public link
When user "Alice" updates the last public link share using the sharing API with
| permissions | 3 |
| password | <password> |
Then the HTTP status code should be "<http-code>"
And the OCS status code should be "<ocs-code>"
Then the HTTP status code should be "<http-status-code>"
And the OCS status code should be "<ocs-status-code>"
And the OCS status message should be "<message>"
Examples:
| password | http-code | ocs-code | message |
| 123 | 400 | 400 | Unfortunately, your password is commonly used. please pick a harder-to-guess password for your safety |
| password | 400 | 400 | Unfortunately, your password is commonly used. please pick a harder-to-guess password for your safety |
| ownCloud | 400 | 400 | Unfortunately, your password is commonly used. please pick a harder-to-guess password for your safety |
| password | http-status-code | ocs-status-code | message |
| 123 | 400 | 400 | Unfortunately, your password is commonly used. please pick a harder-to-guess password for your safety |
| password | 400 | 400 | Unfortunately, your password is commonly used. please pick a harder-to-guess password for your safety |
| ownCloud | 400 | 400 | Unfortunately, your password is commonly used. please pick a harder-to-guess password for your safety |
Scenario Outline: create a public link with a password that is listed in the Banned-Password-List
@@ -279,11 +279,11 @@ Feature: enforce password on public link
| path | /testfile.txt |
| permissions | 3 |
| password | <password> |
Then the HTTP status code should be "<http-code>"
And the OCS status code should be "<ocs-code>"
Then the HTTP status code should be "<http-status-code>"
And the OCS status code should be "<ocs-status-code>"
And the OCS status message should be "<message>"
Examples:
| password | http-code | ocs-code | message |
| 123 | 400 | 400 | Unfortunately, your password is commonly used. please pick a harder-to-guess password for your safety |
| password | 400 | 400 | Unfortunately, your password is commonly used. please pick a harder-to-guess password for your safety |
| ownCloud | 400 | 400 | Unfortunately, your password is commonly used. please pick a harder-to-guess password for your safety |
| password | http-status-code | ocs-status-code | message |
| 123 | 400 | 400 | Unfortunately, your password is commonly used. please pick a harder-to-guess password for your safety |
| password | 400 | 400 | Unfortunately, your password is commonly used. please pick a harder-to-guess password for your safety |
| ownCloud | 400 | 400 | Unfortunately, your password is commonly used. please pick a harder-to-guess password for your safety |

View File

@@ -8,7 +8,7 @@ Feature: get applications
Scenario Outline: admin user lists all the groups
Given the administrator has assigned the role "<role>" to user "Alice" using the Graph API
Given the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
When user "Alice" gets all applications using the Graph API
Then the HTTP status code should be "200"
And the user API response should contain the following application information:
@@ -21,7 +21,7 @@ Feature: get applications
| User |
| User Light |
Examples:
| role |
| user-role |
| Admin |
| Space Admin |
| User |

View File

@@ -10,14 +10,14 @@ Feature: unassign user role
Scenario Outline: admin user unassigns the role of another user
Given user "Brian" has been created with default attributes and without skeleton files
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
And the administrator has assigned the role "<role>" to user "Brian" using the Graph API
And the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
When user "Alice" unassigns the role of user "Brian" using the Graph API
Then the HTTP status code should be "204"
And user "Brian" should not have any role assigned
When user "Brian" uploads file with content "this step will assign the role to default" to "assign-to-default.txt" using the WebDAV API
And user "Brian" should have the role "User" assigned
Examples:
| role |
| user-role |
| Admin |
| Space Admin |
| User |

View File

@@ -495,28 +495,28 @@ Feature: user GDPR (General Data Protection Regulation) report
Scenario Outline: user tries to generate GDPR report of other users
Given user "Brian" has been created with default attributes and without skeleton files
And the administrator has assigned the role "<userRole>" to user "Alice" using the Graph API
And the administrator has assigned the role "<role>" to user "Brian" using the Graph API
And the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
And the administrator has assigned the role "<new-user-role>" to user "Brian" using the Graph API
When user "Alice" tries to export GDPR report of user "Brian" to "/.personal_data_export.json" using Graph API
Then the HTTP status code should be "400"
Examples:
| userRole | role |
| Space Admin | Space Admin |
| Space Admin | User |
| Space Admin | User Light |
| Space Admin | Admin |
| User | Space Admin |
| User | User |
| User | User Light |
| User | Admin |
| User Light | Space Admin |
| User Light | User |
| User Light | User Light |
| User Light | Admin |
| Admin | Space Admin |
| Admin | User |
| Admin | User Light |
| Admin | Admin |
| user-role | new-user-role |
| Space Admin | Space Admin |
| Space Admin | User |
| Space Admin | User Light |
| Space Admin | Admin |
| User | Space Admin |
| User | User |
| User | User Light |
| User | Admin |
| User Light | Space Admin |
| User Light | User |
| User Light | User Light |
| User Light | Admin |
| Admin | Space Admin |
| Admin | User |
| Admin | User Light |
| Admin | Admin |
Scenario: generate a GDPR report and check events when user creates a folder