diff options
author | fenn-cs <fenn25.fn@gmail.com> | 2023-11-29 15:06:51 +0100 |
---|---|---|
committer | Andy Scherzinger <info@andy-scherzinger.de> | 2023-11-30 11:58:35 +0100 |
commit | 9d86a0444daaa6b98fa9013c42609a6d1b042173 (patch) | |
tree | d5c495ed77375f8faf3c8a7afaf9a4cb24b1fafd /apps/files_sharing/src/components/SharingEntryLink.vue | |
parent | bcc1d57a038e8431b63eb9e1e5f76d0616a474eb (diff) | |
download | nextcloud-server-9d86a0444daaa6b98fa9013c42609a6d1b042173.tar.gz nextcloud-server-9d86a0444daaa6b98fa9013c42609a6d1b042173.zip |
Improve share logic for enforced password & expiry date
* It's possible for the admin to enforce and expiry date after, some
shares have been created. This commit makes possible to update the
share with the new admin constraints.
* This commit would users to modify enforced expiry to anything within
range and less than the enforced limit in the pre-create dialog for public
shares.
* This commit fixes, unable to update share without updating password.
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Diffstat (limited to 'apps/files_sharing/src/components/SharingEntryLink.vue')
-rw-r--r-- | apps/files_sharing/src/components/SharingEntryLink.vue | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue index 77caaee0154..d14fc2b6df3 100644 --- a/apps/files_sharing/src/components/SharingEntryLink.vue +++ b/apps/files_sharing/src/components/SharingEntryLink.vue @@ -95,13 +95,13 @@ </NcActionText> <NcActionInput v-if="pendingExpirationDate" class="share-link-expire-date" - :disabled="saving || isExpiryDateEnforced" + :disabled="saving" :is-native-picker="true" :hide-label="true" :value="new Date(share.expireDate)" type="date" :min="dateTomorrow" - :max="dateMaxEnforced" + :max="maxExpirationDateEnforced" @input="onExpirationChange"> <!-- let's not submit when picked, the user might want to still edit or copy the password --> @@ -300,12 +300,6 @@ export default { } return null }, - dateMaxEnforced() { - if (this.config.isDefaultExpireDateEnforced) { - return new Date(new Date().setDate(new Date().getDate() + this.config.defaultExpireDate)) - } - return null - }, /** * Is the current share password protected ? * |