From fb5f29c537ecfc9895e29dc1ca89d3f6578659fa Mon Sep 17 00:00:00 2001 From: Roman Perekhod Date: Thu, 8 Feb 2024 21:56:14 +0100 Subject: [PATCH] fix the bug when the expiration dates can't be removed from link permissions --- changelog/unreleased/sharing-ng-expirationdate.md | 6 ++++++ services/graph/pkg/service/v0/links.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/sharing-ng-expirationdate.md diff --git a/changelog/unreleased/sharing-ng-expirationdate.md b/changelog/unreleased/sharing-ng-expirationdate.md new file mode 100644 index 0000000000..f917b3111c --- /dev/null +++ b/changelog/unreleased/sharing-ng-expirationdate.md @@ -0,0 +1,6 @@ +Bugfix: graph/drives/permission Expiration date update + +We fixed a bug in the Update sharing permission the expiration dates can't be removed from link permissions. + +https://github.com/owncloud/ocis/pull/8413 +https://github.com/owncloud/ocis/issues/8405 diff --git a/services/graph/pkg/service/v0/links.go b/services/graph/pkg/service/v0/links.go index f9303fa5c7..684dd8e67b 100644 --- a/services/graph/pkg/service/v0/links.go +++ b/services/graph/pkg/service/v0/links.go @@ -202,7 +202,7 @@ func (g Graph) libreGraphPermissionFromCS3PublicShare(createdLink *link.PublicSh } func parseAndFillUpTime(t *time.Time) *types.Timestamp { - if t == nil { + if t == nil || t.IsZero() { return nil }