mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-05 19:59:37 -06:00
bugfix: graph/sharedWithMe fix shared.Owner property
The value of driveItem.remoteItem.shared.Owner should match the owner property of the received share not the owner property of the resourceInfo.
This commit is contained in:
committed by
Ralf Haferkamp
parent
03e704c291
commit
b5af346384
@@ -186,6 +186,22 @@ func (g Graph) listSharedWithMe(ctx context.Context) ([]libregraph.DriveItem, er
|
||||
}
|
||||
|
||||
remoteItem.SetCreatedBy(identitySet)
|
||||
}
|
||||
|
||||
if userID := receivedShare.GetShare().GetOwner(); userID != nil {
|
||||
user, err := g.identityCache.GetUser(ctx, userID.GetOpaqueId())
|
||||
if err != nil {
|
||||
g.logger.Error().Err(err).Msg("could not get user")
|
||||
return err
|
||||
}
|
||||
|
||||
identitySet := libregraph.IdentitySet{
|
||||
User: &libregraph.Identity{
|
||||
DisplayName: user.GetDisplayName(),
|
||||
Id: libregraph.PtrString(user.GetId()),
|
||||
},
|
||||
}
|
||||
|
||||
shared.SetOwner(identitySet)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user