Skip to content

Commit cc48b81

Browse files
authored
Merge pull request #26026 from nextcloud/backport/25933/stable21
[stable21] Hide expiration date field for remote shares
2 parents f94c691 + ff95956 commit cc48b81

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

apps/files_sharing/js/dist/files_sharing_tab.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files_sharing/js/dist/files_sharing_tab.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files_sharing/src/components/SharingEntry.vue

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,16 @@
8484
</ActionCheckbox>
8585

8686
<!-- expiration date -->
87-
<ActionCheckbox :checked.sync="hasExpirationDate"
87+
<ActionCheckbox
88+
v-if="canHaveExpirationDate"
89+
:checked.sync="hasExpirationDate"
8890
:disabled="config.isDefaultInternalExpireDateEnforced || saving"
8991
@uncheck="onExpirationDisable">
9092
{{ config.isDefaultInternalExpireDateEnforced
9193
? t('files_sharing', 'Expiration date enforced')
9294
: t('files_sharing', 'Set expiration date') }}
9395
</ActionCheckbox>
94-
<ActionInput v-if="hasExpirationDate"
96+
<ActionInput v-if="canHaveExpirationDate && hasExpirationDate"
9597
ref="expireDate"
9698
v-tooltip.auto="{
9799
content: errors.expireDate,
@@ -222,8 +224,16 @@ export default {
222224
},
223225
224226
canHaveNote() {
225-
return this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE
226-
&& this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP
227+
return !this.isRemoteShare
228+
},
229+
230+
canHaveExpirationDate() {
231+
return !this.isRemoteShare
232+
},
233+
234+
isRemoteShare() {
235+
return this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE
236+
|| this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP
227237
},
228238
229239
/**

0 commit comments

Comments
 (0)