mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-30 17:00:57 -06:00
Merge pull request #6665 from owncloud/frontend_resharing_disabled
[tests-only][full-ci] added scenarios for disabling frontend_enable_resharing
This commit is contained in:
@@ -110,6 +110,7 @@ config = {
|
||||
"apiCors",
|
||||
"apiAsyncUpload",
|
||||
"apiDownloads",
|
||||
"apiReshare",
|
||||
],
|
||||
"skip": False,
|
||||
},
|
||||
|
||||
@@ -211,6 +211,14 @@ default:
|
||||
- OCSContext:
|
||||
- TrashbinContext:
|
||||
|
||||
apiReshare:
|
||||
paths:
|
||||
- '%paths.base%/../features/apiReshare'
|
||||
context: *common_ldap_suite_context
|
||||
contexts:
|
||||
- FeatureContext: *common_feature_context_params
|
||||
- OcisConfigContext:
|
||||
|
||||
extensions:
|
||||
rdx\behatvars\BehatVariablesExtension: ~
|
||||
|
||||
|
||||
58
tests/acceptance/features/apiReshare/disableReshare.feature
Normal file
58
tests/acceptance/features/apiReshare/disableReshare.feature
Normal file
@@ -0,0 +1,58 @@
|
||||
@api @env-config
|
||||
Feature: share by disabling re-share
|
||||
As a user
|
||||
I want to share resources
|
||||
So that other users can have access to them but cannot re-share them
|
||||
|
||||
Background:
|
||||
Given the config "FRONTEND_ENABLE_RESHARING" has been set to "false"
|
||||
And these users have been created with default attributes and without skeleton files:
|
||||
| username |
|
||||
| Alice |
|
||||
| Brian |
|
||||
And user "Alice" has created folder "test"
|
||||
|
||||
|
||||
Scenario Outline: share folder with different roles
|
||||
Given using <dav-path-version> DAV path
|
||||
When user "Alice" creates a share inside of space "Personal" with settings:
|
||||
| path | test |
|
||||
| shareWith | Brian |
|
||||
| role | <role> |
|
||||
Then the HTTP status code should be "200"
|
||||
And the OCS status code should be "200"
|
||||
And the fields of the last response to user "Alice" sharing with user "Brian" should include
|
||||
| permissions | <expectedPermissions> |
|
||||
Examples:
|
||||
| dav-path-version | role | expectedPermissions |
|
||||
| old | editor | 15 |
|
||||
| old | viewer | 1 |
|
||||
| new | editor | 15 |
|
||||
| new | viewer | 1 |
|
||||
| spaces | editor | 15 |
|
||||
| spaces | viewer | 1 |
|
||||
|
||||
|
||||
Scenario Outline: try to re-share folder
|
||||
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 a share inside of space "Personal" with settings:
|
||||
| path | test |
|
||||
| shareWith | Brian |
|
||||
| role | <role> |
|
||||
And user "Brian" has accepted share "/test" offered by user "Alice"
|
||||
When user "Brian" creates a share inside of space "Shares" with settings:
|
||||
| path | test |
|
||||
| shareWith | Carol |
|
||||
| role | <role> |
|
||||
Then the HTTP status code should be "403"
|
||||
And the OCS status code should be "403"
|
||||
And the OCS status message should be "No share permission"
|
||||
Examples:
|
||||
| dav-path-version | role |
|
||||
| old | editor |
|
||||
| old | viewer |
|
||||
| new | editor |
|
||||
| new | viewer |
|
||||
| spaces | editor |
|
||||
| spaces | viewer |
|
||||
Reference in New Issue
Block a user