Merge pull request #10181 from 2403905/issue-10051-code

We fixed the error code for ocm space sharing
This commit is contained in:
Roman Perekhod
2024-09-30 10:48:57 +02:00
committed by GitHub
2 changed files with 7 additions and 1 deletions
@@ -0,0 +1,6 @@
Bugfix: fix the error code for ocm space sharing
We fixed the error code for ocm space sharing
https://github.com/owncloud/ocis/pull/10079
https://github.com/owncloud/ocis/issues/10051
@@ -329,7 +329,7 @@ func (s DriveItemPermissionsService) SpaceRootInvite(ctx context.Context, driveI
objectID := invite.GetRecipients()[0].GetObjectId()
_, err := s.identityCache.GetAcceptedUser(ctx, objectID)
if err == nil {
return libregraph.Permission{}, errorcode.New(errorcode.NotAllowed, "federated user can not become a space member")
return libregraph.Permission{}, errorcode.New(errorcode.InvalidRequest, "federated user can not become a space member")
}
}