From eb25832fb94ff743298c73e351b529f651bde81e Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 3 Aug 2023 10:27:59 +0200 Subject: [PATCH] Fix set or remove expiration date on groups not possible (#9513) * Fix set or remove expiration date on groups not possible * Add changelog item * Rm unused snapshot --- ...-expiration-date-on-group-share-not-possible | 6 ++++++ .../Shares/Collaborators/EditDropdown.vue | 17 +++++++++-------- .../InviteCollaborator/ExpirationDatepicker.vue | 4 +--- .../ExpirationDatepicker.spec.ts | 5 ----- .../ExpirationDatepicker.spec.ts.snap | 3 --- 5 files changed, 16 insertions(+), 19 deletions(-) create mode 100644 changelog/unreleased/bugfix-set-or-remove-expiration-date-on-group-share-not-possible delete mode 100644 packages/web-app-files/tests/unit/components/SideBar/Shares/Collaborators/InviteCollaborator/__snapshots__/ExpirationDatepicker.spec.ts.snap diff --git a/changelog/unreleased/bugfix-set-or-remove-expiration-date-on-group-share-not-possible b/changelog/unreleased/bugfix-set-or-remove-expiration-date-on-group-share-not-possible new file mode 100644 index 00000000000..6498ac95cec --- /dev/null +++ b/changelog/unreleased/bugfix-set-or-remove-expiration-date-on-group-share-not-possible @@ -0,0 +1,6 @@ +Bugfix: Set or remove expiration date on group share not possible + +We've fixed a bug where setting or removing an expiration on a group share wasn't possible. + +https://github.com/owncloud/web/pull/9513 +https://github.com/owncloud/web/issues/8419 diff --git a/packages/web-app-files/src/components/SideBar/Shares/Collaborators/EditDropdown.vue b/packages/web-app-files/src/components/SideBar/Shares/Collaborators/EditDropdown.vue index f2fe4eab03c..08cad53e625 100644 --- a/packages/web-app-files/src/components/SideBar/Shares/Collaborators/EditDropdown.vue +++ b/packages/web-app-files/src/components/SideBar/Shares/Collaborators/EditDropdown.vue @@ -28,7 +28,11 @@ @click="togglePopover" > - + @@ -186,10 +190,7 @@ export default defineComponent({ }, isExpirationSupported() { - return ( - (this.editingUser && this.userExpirationDate) || - (this.editingGroup && this.groupExpirationDate) - ) + return this.editingUser || this.editingGroup }, isExpirationDateSet() { @@ -248,14 +249,14 @@ export default defineComponent({ isExpirationDateEnforced() { if (this.editingUser) { - return this.userExpirationDate.enforced + return this.userExpirationDate?.enforced } if (this.editingGroup) { - return this.groupExpirationDate.enforced + return this.groupExpirationDate?.enforced } - return this.userExpirationDate.enforced || this.groupExpirationDate.enforced + return this.userExpirationDate?.enforced || this.groupExpirationDate?.enforced }, maxExpirationDate() { diff --git a/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/ExpirationDatepicker.vue b/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/ExpirationDatepicker.vue index e1f94bda6dd..38c67771d14 100644 --- a/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/ExpirationDatepicker.vue +++ b/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/ExpirationDatepicker.vue @@ -1,5 +1,5 @@