diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2024-04-04 17:05:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-04 17:05:52 +0200 |
commit | 11ac9b34994ecb02cb8b5b3d85d46b19a0f08b92 (patch) | |
tree | a049d879383409505a80b14ff33044ec0283a1f4 | |
parent | 7a4e0c0cc034060a4d788e5eb25e7f25b3566a2c (diff) | |
parent | 8a008d355d8571b25e51de047b0b21ec635e19d0 (diff) |
Merge pull request #44591 from nextcloud/backport/44571/stable29
[stable29] fix(files_sharing): Create passwords when enforced for mail shares
-rw-r--r-- | apps/files_sharing/src/models/Share.js | 6 | ||||
-rw-r--r-- | apps/files_sharing/src/views/SharingDetailsTab.vue | 11 | ||||
-rw-r--r-- | dist/4997-4997.js | 3 | ||||
-rw-r--r-- | dist/4997-4997.js.LICENSE.txt (renamed from dist/938-938.js.LICENSE.txt) | 0 | ||||
-rw-r--r-- | dist/4997-4997.js.map | 1 | ||||
-rw-r--r-- | dist/938-938.js | 3 | ||||
-rw-r--r-- | dist/938-938.js.map | 1 | ||||
-rw-r--r-- | dist/files_sharing-files_sharing_tab.js | 4 | ||||
-rw-r--r-- | dist/files_sharing-files_sharing_tab.js.map | 2 |
9 files changed, 14 insertions, 17 deletions
diff --git a/apps/files_sharing/src/models/Share.js b/apps/files_sharing/src/models/Share.js index 5504c63b345..b88d376a0ff 100644 --- a/apps/files_sharing/src/models/Share.js +++ b/apps/files_sharing/src/models/Share.js @@ -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 ?? '' } /** diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue index e852a0f8599..5e7f7c1b452 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -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() } }, diff --git a/dist/4997-4997.js b/dist/4997-4997.js new file mode 100644 index 00000000000..37943077351 --- /dev/null +++ b/dist/4997-4997.js @@ -0,0 +1,3 @@ +/*! For license information please see 4997-4997.js.LICENSE.txt */ +(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[4997],{17816:function(t,e,n){var i=n(96763);t.exports=function(){"use strict";function t(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}var e=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(e,n){var r;r=function(){return function e(n,i,r){function a(o,l){if(!i[o]){if(!n[o]){if(!l&&t)return t();if(s)return s(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var h=i[o]={exports:{}};n[o][0].call(h.exports,(function(t){return a(n[o][1][t]||t)}),h,h.exports,e,n,i,r)}return i[o].exports}for(var s=t,o=0;o<r.length;o++)a(r[o]);return a}({1:[function(t,e,n){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},{}],2:[function(t,e,n){var i=t("./utils").getSymbolSize;n.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,n=i(t),r=145===n?26:2*Math.ceil((n-13)/(2*e-2)),a=[n-7],s=1;s<e-1;s++)a[s]=a[s-1]-r;return a.push(6),a.reverse()},n.getPositions=function(t){for(var e=[],i=n.getRowColCoords(t),r=i.length,a=0;a<r;a++)for(var s=0;s<r;s++)0===a&&0===s||0===a&&s===r-1||a===r-1&&0===s||e.push([i[a],i[s]]);return e}},{"./utils":21}],3:[function(t,e,n){var i=t("./mode"),r=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function a(t){this.mode=i.ALPHANUMERIC,this.data=t}a.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},a.prototype.getLength=function(){return this.data.length},a.prototype.getBits |