Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2020-11-11 00:17:04 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2020-11-11 13:51:28 +0300
commit487c603f957682454d6059124176bfa73623e3fc (patch)
tree4354d87a709ee4b98f867069baf79fed1198540e /build
parentf58174fdd847038b4bac3c2120f3fd0be0358fe5 (diff)
Add integration tests for default share permissions
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/bootstrap/SharingContext.php1
-rw-r--r--build/integration/sharing_features/sharing-v1.feature34
2 files changed, 35 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/SharingContext.php b/build/integration/features/bootstrap/SharingContext.php
index ab480dec4a3..447b8f1c024 100644
--- a/build/integration/features/bootstrap/SharingContext.php
+++ b/build/integration/features/bootstrap/SharingContext.php
@@ -37,6 +37,7 @@ class SharingContext implements Context, SnippetAcceptingContext {
use CommandLine;
protected function resetAppConfigs() {
+ $this->modifyServerConfig('core', 'shareapi_default_permissions', '31');
$this->modifyServerConfig('sharebymail', 'enforcePasswordProtection', 'no');
}
}
diff --git a/build/integration/sharing_features/sharing-v1.feature b/build/integration/sharing_features/sharing-v1.feature
index 764cd857a3e..38eb2d8a812 100644
--- a/build/integration/sharing_features/sharing-v1.feature
+++ b/build/integration/sharing_features/sharing-v1.feature
@@ -357,6 +357,40 @@ Feature: sharing
| url | AN_URL |
| mimetype | httpd/unix-directory |
+ Scenario: Creating a new share of a file with default permissions
+ Given user "user0" exists
+ And user "user1" exists
+ And As an "user0"
+ And parameter "shareapi_default_permissions" of app "core" is set to "7"
+ When creating a share with
+ | path | welcome.txt |
+ | shareWith | user1 |
+ | shareType | 0 |
+ And the OCS status code should be "100"
+ And the HTTP status code should be "200"
+ And Getting info of last share
+ Then the OCS status code should be "100"
+ And the HTTP status code should be "200"
+ And Share fields of last share match with
+ | permissions | 3 |
+
+ Scenario: Creating a new share of a folder with default permissions
+ Given user "user0" exists
+ And user "user1" exists
+ And As an "user0"
+ And parameter "shareapi_default_permissions" of app "core" is set to "7"
+ When creating a share with
+ | path | FOLDER |
+ | shareWith | user1 |
+ | shareType | 0 |
+ And the OCS status code should be "100"
+ And the HTTP status code should be "200"
+ And Getting info of last share
+ Then the OCS status code should be "100"
+ And the HTTP status code should be "200"
+ And Share fields of last share match with
+ | permissions | 7 |
+
Scenario: getting all shares of a user using that user
Given user "user0" exists
And user "user1" exists