mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-08 05:09:46 -06:00
refactor test to add federated user to a project space
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
This commit is contained in:
@@ -257,12 +257,6 @@ The expected failures in this file are from features in the owncloud/ocis repo.
|
||||
|
||||
- [apiOcm/deleteFederatedConnections.feature:103](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/deleteFederatedConnections.feature#L103)
|
||||
|
||||
#### [OCM. Prevent federated users from being added as members of the space](https://github.com/owncloud/ocis/issues/10051)
|
||||
|
||||
- [apiOcm/share.feature:307](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L307)
|
||||
- [apiOcm/share.feature:308](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L308)
|
||||
- [apiOcm/share.feature:309](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L309)
|
||||
|
||||
#### [same href in REPORT request for all dav-path-version](https://github.com/owncloud/ocis/issues/7060)
|
||||
|
||||
- [apiSearch1/dateSearch.feature:17](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSearch1/dateSearch.feature#L17)
|
||||
|
||||
@@ -272,43 +272,58 @@ Feature: an user shares resources using ScienceMesh application
|
||||
And "Alice" has created the federation share invitation
|
||||
And using server "REMOTE"
|
||||
And "Brian" has accepted invitation
|
||||
And using server "LOCAL"
|
||||
And using spaces DAV path
|
||||
And the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API
|
||||
And user "Brian" has created a space "brian's space" with the default quota using the Graph API
|
||||
When user "Brian" tries to send the following space share invitation to federated user using permissions endpoint of the Graph API:
|
||||
| space | brian's space |
|
||||
| sharee | Alice |
|
||||
| shareType | user |
|
||||
| permissionsRole | <permissions-role> |
|
||||
| federatedServer | @ocis-server:9200 |
|
||||
Then the HTTP status code should be "403"
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "alice's space" with the default quota using the Graph API
|
||||
When user "Alice" tries to send the following space share invitation to federated user using permissions endpoint of the Graph API:
|
||||
| space | alice's space |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | <permissions-role> |
|
||||
| federatedServer | @federation-ocis-server:10200 |
|
||||
Then the HTTP status code should be "400"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"required": ["error"],
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "PERMISSION_DENIED"
|
||||
},
|
||||
"message": {
|
||||
"const": "permission denied to create the file"
|
||||
"error": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"innererror",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "invalidRequest"
|
||||
},
|
||||
"innererror": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"date",
|
||||
"request-id"
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"const": "federated user can not become a space member"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
And using server "LOCAL"
|
||||
And the user "Alice" should not have a space called "brian's space"
|
||||
And using server "REMOTE"
|
||||
And the user "Brian" should not have a space called "alice's space"
|
||||
Examples:
|
||||
| permissions-role |
|
||||
| Space Viewer |
|
||||
| Space Editor |
|
||||
| Manager |
|
||||
|
||||
|
||||
@issue-10051
|
||||
Scenario Outline: try to add federated user as a member of a project space (root endpoint)
|
||||
Given using server "LOCAL"
|
||||
And using spaces DAV path
|
||||
|
||||
Reference in New Issue
Block a user