Merge pull request #5047 from owncloud/add-apitest-share-space-without-manager-permission
[full-ci] [tests-only] Added api test for sharing spaces with/out manager permission
This commit is contained in:
@@ -17,7 +17,7 @@ Feature: Share spaces
|
||||
And using spaces DAV path
|
||||
|
||||
|
||||
Scenario Outline:: A user can share a space to another user
|
||||
Scenario Outline:: A Space Admin can share a space to another user
|
||||
When user "Alice" shares a space "share space" to user "Brian" with role "<role>"
|
||||
Then the HTTP status code should be "200"
|
||||
And the OCS status code should be "200"
|
||||
@@ -101,3 +101,38 @@ Feature: Share spaces
|
||||
| manager |
|
||||
| editor |
|
||||
| viewer |
|
||||
|
||||
|
||||
Scenario Outline: A user with manager role can share a space to another user
|
||||
Given user "Alice" has shared a space "share space" to user "Brian" with role "manager"
|
||||
When user "Brian" shares a space "share space" to user "Bob" with role "<role>"
|
||||
Then the HTTP status code should be "200"
|
||||
And the OCS status code should be "200"
|
||||
And the OCS status message should be "OK"
|
||||
And the user "Bob" should have a space called "share space" with these key and value pairs:
|
||||
| key | value |
|
||||
| driveType | project |
|
||||
| id | %space_id% |
|
||||
| name | share space |
|
||||
Examples:
|
||||
| role |
|
||||
| manager |
|
||||
| editor |
|
||||
| viewer |
|
||||
|
||||
|
||||
Scenario Outline: A user with editor or viewer role cannot share a space to another user
|
||||
Given user "Alice" has shared a space "share space" to user "Brian" with role "<role>"
|
||||
When user "Brian" shares a space "share space" to user "Bob" with role "<new_role>"
|
||||
Then the HTTP status code should be "404"
|
||||
And the OCS status code should be "404"
|
||||
And the OCS status message should be "No share permission"
|
||||
And the user "Bob" should not have a space called "share space"
|
||||
Examples:
|
||||
| role | new_role |
|
||||
| editor | manager |
|
||||
| editor | editor |
|
||||
| editor | viewer |
|
||||
| viewer | manager |
|
||||
| viewer | editor |
|
||||
| viewer | viewer |
|
||||
|
||||
Reference in New Issue
Block a user