Skip to content

Commit 000ee54

Browse files
authored
Merge pull request #49799 from nextcloud/fix/no-issue/enforced-props-checks
fix(files_sharing): Correct property enforced property names
2 parents 30ff2ae + c9f64d3 commit 000ee54

9 files changed

Lines changed: 14 additions & 15 deletions

apps/files_sharing/src/components/SharingEntryLink.vue

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -486,23 +486,22 @@ export default {
486486
pendingDefaultExpirationDate() {
487487
return (this.config.defaultExpirationDate instanceof Date || !isNaN(new Date(this.config.defaultExpirationDate).getTime())) && this.isPendingShare
488488
},
489-
490489
isPendingShare() {
491490
return !!(this.share && !this.share.id)
492491
},
493-
sharePolicyHasRequiredProperties() {
492+
sharePolicyHasEnforcedProperties() {
494493
return this.config.enforcePasswordForPublicLink || this.config.isDefaultExpireDateEnforced
495494
},
496495
497-
requiredPropertiesMissing() {
496+
enforcedPropertiesMissing() {
498497
// Ensure share exist and the share policy has required properties
499-
if (!this.sharePolicyHasRequiredProperties) {
498+
if (!this.sharePolicyHasEnforcedProperties) {
500499
return false
501500
}
502501
503502
if (!this.share) {
504503
// if no share, we can't tell if properties are missing or not so we assume properties are missing
505-
return true
504+
return true
506505
}
507506
508507
// If share has ID, then this is an incoming link share created from the existing link share
@@ -604,7 +603,7 @@ export default {
604603
* @param {boolean} shareReviewComplete if the share was reviewed
605604
* @return {boolean}
606605
*/
607-
shareRequiresReview(shareReviewComplete) {
606+
shareRequiresReview(shareReviewComplete) {
608607
// If a user clicks 'Create share' it means they have reviewed the share
609608
if (shareReviewComplete) {
610609
return false
@@ -615,7 +614,7 @@ export default {
615614
* Create a new share link and append it to the list
616615
* @param {boolean} shareReviewComplete if the share was reviewed
617616
*/
618-
async onNewLinkShare(shareReviewComplete = false) {
617+
async onNewLinkShare(shareReviewComplete = false) {
619618
this.logger.debug('onNewLinkShare called (with this.share)', this.share)
620619
// do not run again if already loading
621620
if (this.loading) {
@@ -631,7 +630,7 @@ export default {
631630
shareDefaults.expiration = this.formatDateToString(this.config.defaultExpirationDate)
632631
}
633632
634-
this.logger.debug('Missing required properties?', this.requiredPropertiesMissing)
633+
this.logger.debug('Missing required properties?', this.enforcedPropertiesMissing)
635634
// Do not push yet if we need a password or an expiration date: show pending menu
636635
// A share would require a review for example is default expiration date is set but not enforced, this allows
637636
// the user to review the share and remove the expiration date if they don't want it
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/3537-3537.js.map

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

dist/3537-3537.js.map.license

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3537-3537.js.license

dist/4005-4005.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/4005-4005.js.map.license

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/files_sharing-files_sharing_tab.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-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.

0 commit comments

Comments
 (0)