Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only][full-ci] refactor test to add federated user as a member of a project space using permissions endpoint #10379

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
57 changes: 36 additions & 21 deletions tests/acceptance/features/apiOcm/share.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down