|
|
|
|
@ -496,26 +496,6 @@ export default {
|
|
|
|
|
: ''
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* Is the current share password protected ?
|
|
|
|
|
*
|
|
|
|
|
* @return {boolean}
|
|
|
|
|
*/
|
|
|
|
|
isPasswordProtected: {
|
|
|
|
|
get() {
|
|
|
|
|
return this.config.enforcePasswordForPublicLink
|
|
|
|
|
|| !!this.share.password
|
|
|
|
|
},
|
|
|
|
|
async set(enabled) {
|
|
|
|
|
if (enabled) {
|
|
|
|
|
this.share.password = await GeneratePassword(true)
|
|
|
|
|
this.$set(this.share, 'newPassword', this.share.password)
|
|
|
|
|
} else {
|
|
|
|
|
this.share.password = ''
|
|
|
|
|
this.$delete(this.share, 'newPassword')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* Is the current share a folder ?
|
|
|
|
|
*
|
|
|
|
|
@ -873,8 +853,9 @@ export default {
|
|
|
|
|
async initializeAttributes() {
|
|
|
|
|
|
|
|
|
|
if (this.isNewShare) {
|
|
|
|
|
if (this.isPasswordEnforced && this.isPublicShare) {
|
|
|
|
|
if ((this.config.enableLinkPasswordByDefault || this.isPasswordEnforced) && this.isPublicShare) {
|
|
|
|
|
this.$set(this.share, 'newPassword', await GeneratePassword(true))
|
|
|
|
|
this.$set(this.share, 'password', this.share.newPassword)
|
|
|
|
|
this.advancedSectionAccordionExpanded = true
|
|
|
|
|
}
|
|
|
|
|
/* Set default expiration dates if configured */
|
|
|
|
|
|