Skip to content

Commit

Permalink
Merge pull request #49808 from nextcloud/backport/49799/stable29
Browse files Browse the repository at this point in the history
[stable29] fix(files_sharing): Correct property enforced property names
  • Loading branch information
skjnldsv authored Dec 11, 2024
2 parents c460526 + 588d251 commit 907b44a
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
13 changes: 6 additions & 7 deletions apps/files_sharing/src/components/SharingEntryLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -491,17 +491,16 @@ export default {
pendingDefaultExpirationDate() {
return (this.config.defaultExpirationDate instanceof Date || !isNaN(new Date(this.config.defaultExpirationDate).getTime())) && this.isPendingShare
},

isPendingShare() {
return !!(this.share && !this.share.id)
},
sharePolicyHasRequiredProperties() {
sharePolicyHasEnforcedProperties() {
return this.config.enforcePasswordForPublicLink || this.config.isDefaultExpireDateEnforced
},

requiredPropertiesMissing() {
enforcedPropertiesMissing() {
// Ensure share exist and the share policy has required properties
if (!this.sharePolicyHasRequiredProperties) {
if (!this.sharePolicyHasEnforcedProperties) {
return false
}

Expand Down Expand Up @@ -603,7 +602,7 @@ export default {
* @param {boolean} shareReviewComplete if the share was reviewed
* @return {boolean}
*/
shareRequiresReview(shareReviewComplete) {
shareRequiresReview(shareReviewComplete) {
// If a user clicks 'Create share' it means they have reviewed the share
if (shareReviewComplete) {
return false
Expand All @@ -614,7 +613,7 @@ export default {
* Create a new share link and append it to the list
* @param {boolean} shareReviewComplete if the share was reviewed
*/
async onNewLinkShare(shareReviewComplete = false) {
async onNewLinkShare(shareReviewComplete = false) {
this.logger.debug('onNewLinkShare called (with this.share)', this.share)
// do not run again if already loading
if (this.loading) {
Expand All @@ -630,7 +629,7 @@ export default {
shareDefaults.expiration = this.formatDateToString(this.config.defaultExpirationDate)
}

this.logger.debug('Missing required properties?', this.requiredPropertiesMissing)
this.logger.debug('Missing required properties?', this.enforcedPropertiesMissing)
// Do not push yet if we need a password or an expiration date: show pending menu
// A share would require a review for example is default expiration date is set but not enforced, this allows
// the user to review the share and remove the expiration date if they don't want it
Expand Down
1 change: 0 additions & 1 deletion dist/6972-6972.js.map

This file was deleted.

6 changes: 3 additions & 3 deletions dist/6972-6972.js → dist/8407-8407.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/8407-8407.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/files_sharing-files_sharing_tab.js.map

Large diffs are not rendered by default.

0 comments on commit 907b44a

Please sign in to comment.