mirror of
https://github.com/nextcloud/server.git
synced 2026-06-07 07:43:18 -04:00
Merge pull request #44591 from nextcloud/backport/44571/stable29
[stable29] fix(files_sharing): Create passwords when enforced for mail shares
This commit is contained in:
commit
11ac9b3499
9 changed files with 14 additions and 17 deletions
|
|
@ -43,11 +43,11 @@ export default class Share {
|
|||
ocsData.hide_download = !!ocsData.hide_download
|
||||
ocsData.mail_send = !!ocsData.mail_send
|
||||
|
||||
if (ocsData.attributes) {
|
||||
if (ocsData.attributes && typeof ocsData.attributes === 'string') {
|
||||
try {
|
||||
ocsData.attributes = JSON.parse(ocsData.attributes)
|
||||
} catch (e) {
|
||||
console.warn('Could not parse share attributes returned by server: "' + ocsData.attributes + '"')
|
||||
console.warn('Could not parse share attributes returned by server', ocsData.attributes)
|
||||
}
|
||||
}
|
||||
ocsData.attributes = ocsData.attributes ?? []
|
||||
|
|
@ -310,7 +310,7 @@ export default class Share {
|
|||
* @memberof Share
|
||||
*/
|
||||
get label() {
|
||||
return this._share.label
|
||||
return this._share.label ?? ''
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@ export default {
|
|||
return this.share.type === this.SHARE_TYPES.SHARE_TYPE_GROUP
|
||||
},
|
||||
isNewShare() {
|
||||
return this.share.id === null || this.share.id === undefined
|
||||
return !this.share.id
|
||||
},
|
||||
allowsFileDrop() {
|
||||
if (this.isFolder && this.config.isPublicUploadEnabled) {
|
||||
|
|
@ -788,13 +788,10 @@ export default {
|
|||
|
||||
},
|
||||
handleShareType() {
|
||||
if (this.share.share_type) {
|
||||
this.share.type = this.share.share_type
|
||||
}
|
||||
// shareType 0 (USER_SHARE) would evaluate to zero
|
||||
// Hence the use of hasOwnProperty
|
||||
if ('shareType' in this.share) {
|
||||
this.share.type = this.share.shareType
|
||||
} else if (this.share.share_type) {
|
||||
this.share.type = this.share.share_type
|
||||
}
|
||||
},
|
||||
handleDefaultPermissions() {
|
||||
|
|
@ -815,7 +812,7 @@ export default {
|
|||
this.sharingPermission = 'custom'
|
||||
this.advancedSectionAccordionExpanded = true
|
||||
this.setCustomPermissions = true
|
||||
} else {
|
||||
} else if (this.share.permissions) {
|
||||
this.sharingPermission = this.share.permissions.toString()
|
||||
}
|
||||
},
|
||||
|
|
|
|||
3
dist/4997-4997.js
vendored
Normal file
3
dist/4997-4997.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/4997-4997.js.map
vendored
Normal file
1
dist/4997-4997.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
3
dist/938-938.js
vendored
3
dist/938-938.js
vendored
File diff suppressed because one or more lines are too long
1
dist/938-938.js.map
vendored
1
dist/938-938.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files_sharing-files_sharing_tab.js
vendored
4
dist/files_sharing-files_sharing_tab.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-files_sharing_tab.js.map
vendored
2
dist/files_sharing-files_sharing_tab.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue