mirror of
https://github.com/owncloud/ocis
synced 2026-04-25 17:25:21 +02:00
fix: missing invitation in permission responses
Fixes a bug where the `invitation` property is missing in the response when creating, listing or updating graph permissions.
This commit is contained in:
@@ -404,6 +404,19 @@ func (g BaseGraphService) cs3UserShareToPermission(ctx context.Context, share *c
|
||||
perm.SetRoles(nil)
|
||||
}
|
||||
perm.SetGrantedToV2(grantedTo)
|
||||
if share.GetCreator() != nil {
|
||||
identity, err := cs3UserIdToIdentity(ctx, g.identityCache, share.GetCreator())
|
||||
if err != nil {
|
||||
return nil, errorcode.New(errorcode.GeneralException, err.Error())
|
||||
}
|
||||
perm.SetInvitation(
|
||||
libregraph.SharingInvitation{
|
||||
InvitedBy: &libregraph.IdentitySet{
|
||||
User: &identity,
|
||||
},
|
||||
},
|
||||
)
|
||||
}
|
||||
return &perm, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user