diff --git a/changelog/unreleased/fix-update-userhare.md b/changelog/unreleased/fix-update-userhare.md new file mode 100644 index 00000000000..1a2e7c6cfca --- /dev/null +++ b/changelog/unreleased/fix-update-userhare.md @@ -0,0 +1,6 @@ +Bugfix: Allow UpdateUserShare() to update just the expiration date + +The UpdateUserShare Request now works if it just contains an update of the +expiration date. + +https://github.com/cs3org/reva/pull/xxxx diff --git a/internal/grpc/services/gateway/usershareprovider.go b/internal/grpc/services/gateway/usershareprovider.go index bbcfbf0bc4a..fd5a57f9e95 100644 --- a/internal/grpc/services/gateway/usershareprovider.go +++ b/internal/grpc/services/gateway/usershareprovider.go @@ -123,9 +123,9 @@ func (s *svc) updateShare(ctx context.Context, req *collaboration.UpdateShareReq if s.c.CommitShareToStorageGrant { creator := ctxpkg.ContextMustGetUser(ctx) grant := &provider.Grant{ - Grantee: req.GetShare().GetGrantee(), - Permissions: req.GetShare().GetPermissions().GetPermissions(), - Expiration: req.GetShare().GetExpiration(), + Grantee: res.GetShare().GetGrantee(), + Permissions: res.GetShare().GetPermissions().GetPermissions(), + Expiration: res.GetShare().GetExpiration(), Creator: creator.GetId(), } updateGrantStatus, err := s.updateGrant(ctx, res.GetShare().GetResourceId(), grant, nil)