Merge pull request #49809 from nextcloud/backport/49799/stable30

[stable30] fix(files_sharing): Correct property enforced property names
This commit is contained in:
Arthur Schiwon 2024-12-12 09:32:15 +01:00 committed by GitHub
commit 9fa3893bfb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 14 additions and 15 deletions

View file

@ -484,23 +484,22 @@ 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
}
if (!this.share) {
// if no share, we can't tell if properties are missing or not so we assume properties are missing
return true
return true
}
// If share has ID, then this is an incoming link share created from the existing link share
@ -602,7 +601,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
@ -613,7 +612,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) {
@ -629,7 +628,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

File diff suppressed because one or more lines are too long

1
dist/2249-2249.js.map vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/2249-2249.js.map.license vendored Symbolic link
View file

@ -0,0 +1 @@
2249-2249.js.license

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
8142-8142.js.license

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long