opencloud
opencloud copied to clipboard
[full-ci] revaBump-v2.40.0
reva bump for rc.3
close to favor #1928
apiOcm/share.feature is failed because recipient doesn't see sharer name
second bug
Scenario: local user shares a folder from project space to federation user #
/Users/v.scharf/Work/opencloud/opencloud/tests/acceptance/features/apiOcm/share.feature:374
Given using server "LOCAL" # FeatureContext::usingServer()
And "Alice" has created the federation share invitation # OcmContext::userHasCreatedTheFederationShareInvitation()
And using server "REMOTE" # FeatureContext::usingServer()
And "Brian" has accepted invitation # OcmContext::userHasAcceptedTheLastFederationShareInvitation()
And using server "LOCAL" # FeatureContext::usingServer()
And using spaces DAV path # FeatureContext::usingOldOrNewOrSpacesDavPath()
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API # GraphContext::theAdministratorHasGivenTheRoleUsingTheGraphApi()
And user "Alice" has created a space "projectSpace" with the default quota using the Graph API # SpacesContext::theUserHasCreatedASpaceByDefaultUsingTheGraphApi()
And user "Alice" has created a folder "folderToShare" in space "projectSpace" # SpacesContext::userHasCreatedAFolderInSpace()
When user "Alice" sends the following resource share invitation to federated user using the Graph API: # SharingNgContext::userSendsTheFollowingResourceShareInvitationToFederatedUserUsingTheGraphApi()
| resource | folderToShare |
| space | projectSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
Then the HTTP status code should be "200" # FeatureContext::thenTheHTTPStatusCodeShouldBe()
HTTP status code 400 is not the expected value 200
Failed asserting that 400 matches expected '200'.
Actual
{"level":"error","service":"graph","graph api":"DrivesDriveItemService","error":"invalidRequest: invalid parameters","time":"2025-11-27T16:22:09+01:00","message":"share creation failed"}
apiOcm/share.featureis failed because recipient doesn't see sharer name
This should be fixed by: https://github.com/opencloud-eu/reva/pull/442
@ScharfViktor can you try with:
diff --git a/tests/acceptance/bootstrap/SharingNgContext.php b/tests/acceptance/bootstrap/SharingNgContext.php
index 1229e78ba91..e7752c4ab09 100644
--- a/tests/acceptance/bootstrap/SharingNgContext.php
+++ b/tests/acceptance/bootstrap/SharingNgContext.php
@@ -327,12 +327,11 @@ class SharingNgContext implements Context {
if ($shareType === "user") {
$shareeId = $this->featureContext->getAttributeOfCreatedUser($sharee, 'id');
if ($federatedShare) {
- $shareeId = (
- $this->featureContext->ocmContext->getAcceptedUserByName(
- $user,
- $sharee
- )
- )['user_id'];
+ $federatedUser = $this->featureContext->ocmContext->getAcceptedUserByName(
+ $user,
+ $sharee
+ );
+ $shareeId = $federatedUser['user_id']+"@"+$federatedUser['idp'];
}
} elseif ($shareType === "group") {
$shareeId = $this->featureContext->getAttributeOfCreatedGroup($sharee, 'id');
@@ -403,7 +402,11 @@ class SharingNgContext implements Context {
if ($shareType === "user") {
$shareeId = $this->featureContext->getAttributeOfCreatedUser($sharee, 'id');
if ($federatedShare) {
- $shareeId = ($this->featureContext->ocmContext->getAcceptedUserByName($user, $sharee))['user_id'];
+ $federatedUser = $this->featureContext->ocmContext->getAcceptedUserByName(
+ $user,
+ $sharee
+ );
+ $shareeId = $federatedUser['user_id']+"@"+$federatedUser['idp'];
}
} elseif ($shareType === "group") {
$shareeId = $this->featureContext->getAttributeOfCreatedGroup($sharee, 'id');