diff options
author | fenn-cs <fenn25.fn@gmail.com> | 2024-11-06 16:50:59 +0100 |
---|---|---|
committer | nfebe <fenn25.fn@gmail.com> | 2024-12-09 02:50:16 +0100 |
commit | e43aa76a0036dbdc04ca54d2cab4ec2c5f33bde3 (patch) | |
tree | ff9c00ddcdf8f2c0aac0e222ddf49d333a09f2d5 | |
parent | b96661bd585534126082c97a0d318a1f647abc74 (diff) | |
download | nextcloud-server-e43aa76a0036dbdc04ca54d2cab4ec2c5f33bde3.tar.gz nextcloud-server-e43aa76a0036dbdc04ca54d2cab4ec2c5f33bde3.zip |
fix(SharingEntryLink): Show default password before create if any
Prevent silent addition of expiration date to shares.
Prevent silent addition for password to shares.
Both now have a `shareRequiresReview` check
Resolves : https://github.com/nextcloud/server/issues/48860
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
-rw-r--r-- | apps/files_sharing/src/components/SharingEntryLink.vue | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue index cda056a4dca..f6e162b7d87 100644 --- a/apps/files_sharing/src/components/SharingEntryLink.vue +++ b/apps/files_sharing/src/components/SharingEntryLink.vue @@ -96,9 +96,9 @@ </NcActionCheckbox> <!-- expiration date --> - <NcActionInput v-if="pendingExpirationDate" + <NcActionInput v-if="(hasDefaultExpirationDate || pendingEnforcedExpirationDate) && defaultExpirationDateEnabled" class="share-link-expire-date" - :label="t('files_sharing', 'Expiration date (enforced)')" + :label="pendingEnforcedExpirationDate ? t('files_sharing', 'Enter expiration date (enforced)') : t('files_sharing', 'Enter expiration date')" :disabled="saving" :is-native-picker="true" :hide-label="true" @@ -538,6 +538,10 @@ export default { this.share.expireDate = this.defaultExpirationDateEnabled ? this.formatDateToString(this.config.defaultExpirationDate) : '' } }, + mounted() { + this.defaultExpirationDateEnabled = this.config.defaultExpirationDate instanceof Date + this.share.expireDate = this.defaultExpirationDateEnabled ? this.formatDateToString(this.config.defaultExpirationDate) : '' + }, methods: { /** |