Removed system config setting steps

This commit is contained in:
Prarup Gurung
2023-02-28 11:21:06 +05:45
parent 145577ebbd
commit 8541081d76
11 changed files with 6 additions and 212 deletions
@@ -30,7 +30,6 @@ Feature: users cannot move (rename) a folder to a blacklisted name
Scenario Outline: Rename a folder to a banned name
Given using <dav_version> DAV path
And user "Alice" has created folder "/testshare"
And the administrator has updated system config key "blacklisted_files" with value '["blacklisted-file.txt",".htaccess"]' and type "json"
When user "Alice" moves folder "/testshare" to "/blacklisted-file.txt" using the WebDAV API
Then the HTTP status code should be "403"
And user "Alice" should see the following elements
@@ -51,9 +50,6 @@ Feature: users cannot move (rename) a folder to a blacklisted name
And user "Brian" has been created with default attributes and without skeleton files
And user "Brian" has created folder "/testshare"
And user "Brian" has created folder "/FOLDER"
# Note: we have to write JSON for the value, and to get a backslash in the double-quotes we have to escape it
# The actual regular expressions end up being .*\.ext$ and ^bannedfilename\..+
And the administrator has updated system config key "blacklisted_files_regex" with value '[".*\\.ext$","^bannedfilename\\..+","containsbannedstring"]' and type "json"
When user "Brian" moves folder "/testshare" to these foldernames using the webDAV API then the results should be as listed
| foldername | http-code | exists |
| .ext | 403 | no |
@@ -12,7 +12,6 @@ Feature: users cannot move (rename) a folder to or into an excluded directory
Scenario Outline: Rename a folder to an excluded directory name
Given using <dav_version> DAV path
And user "Alice" has created folder "/testshare"
And the administrator has updated system config key "excluded_directories" with value '[".github"]' and type "json"
When user "Alice" moves folder "/testshare" to "/.github" using the WebDAV API
Then the HTTP status code should be "403"
And user "Alice" should see the following elements
@@ -32,7 +31,6 @@ Feature: users cannot move (rename) a folder to or into an excluded directory
Given using <dav_version> DAV path
And user "Alice" has created folder "/testshare"
And user "Alice" has created folder "/FOLDER"
And the administrator has updated system config key "excluded_directories" with value '[".github"]' and type "json"
When user "Alice" moves folder "/testshare" to "/FOLDER/.github" using the WebDAV API
Then the HTTP status code should be "403"
And user "Alice" should see the following elements
@@ -52,9 +50,6 @@ Feature: users cannot move (rename) a folder to or into an excluded directory
Given using <dav_version> DAV path
And user "Alice" has created folder "/testshare"
And user "Alice" has created folder "/FOLDER"
# Note: we have to write JSON for the value, and to get a backslash in the double-quotes we have to escape it
# The actual regular expressions end up being endswith\.bad$ and ^\.git
And the administrator has updated system config key "excluded_directories_regex" with value '["endswith\\.bad$","^\\.git","containsvirusinthename"]' and type "json"
When user "Alice" moves folder "/testshare" to these foldernames using the webDAV API then the results should be as listed
| foldername | http-code | exists |
| endswith.bad | 403 | no |