diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue index 7986d7e53eda9..22f66cbbc28e7 100644 --- a/apps/files_sharing/src/components/SharingEntryLink.vue +++ b/apps/files_sharing/src/components/SharingEntryLink.vue @@ -298,6 +298,8 @@ export default { copySuccess: true, copied: false, defaultExpirationDateEnabled: false, + shareReviewComplete: false, + calls: 0, // Are we waiting for password/expiration date pending: false, @@ -492,7 +494,11 @@ export default { }, shareRequiresReview() { - return this.defaultExpirationDateEnabled || this.config.enableLinkPasswordByDefault + this.logger.info('Share requires review?', this.shareReviewComplete) + if (this.shareReviewComplete) { + return false + } + return (this.defaultExpirationDateEnabled || this.config.enableLinkPasswordByDefault) && !this.isPendingShare }, sharePolicyHasRequiredProperties() { @@ -596,8 +602,8 @@ export default { }, }, mounted() { + this.defaultExpirationDateEnabled = this.config.defaultExpirationDate instanceof Date if (this.share) { - this.defaultExpirationDateEnabled = this.config.defaultExpirationDate instanceof Date this.share.expireDate = this.defaultExpirationDateEnabled ? this.formatDateToString(this.config.defaultExpirationDate) : '' } }, @@ -629,8 +635,7 @@ export default { if ((this.sharePolicyHasRequiredProperties && this.requiredPropertiesMissing) || this.shareRequiresReview) { this.pending = true this.shareCreationComplete = false - - this.logger.info('Share policy requires mandated properties (password)...') + this.logger.info('Share policy requires a review or has mandated properties (password, expirationDate)...') // ELSE, show the pending popovermenu // if password default or enforced, pre-fill with random one @@ -648,6 +653,7 @@ export default { // freshly created share component this.open = false this.pending = false + this.shareReviewComplete = true component.open = true // Nothing is enforced, creating share directly @@ -678,6 +684,7 @@ export default { const share = new Share(shareDefaults) await this.pushNewLinkShare(share) this.shareCreationComplete = true + this.shareReviewComplete = false } },