diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-06-02 12:31:21 +0300 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-07-28 17:53:23 +0300 |
commit | a11c6e7cc3eec18cba62ebd32e0b8653d97ed929 (patch) | |
tree | bafafff8804d17ec7a0fa41f908bea6a761aa962 /apps/files_sharing/src/mixins/SharesMixin.js | |
parent | 92e60e38589f47bdd71114b2c54217ba6fdc7dd2 (diff) |
Add share attrs + download permission support in frontend
Added download permission checkbox in frontend
Added share attributes parsing and setting in frontend.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/files_sharing/src/mixins/SharesMixin.js')
-rw-r--r-- | apps/files_sharing/src/mixins/SharesMixin.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_sharing/src/mixins/SharesMixin.js b/apps/files_sharing/src/mixins/SharesMixin.js index daeacfa4b8b..053babd3a1d 100644 --- a/apps/files_sharing/src/mixins/SharesMixin.js +++ b/apps/files_sharing/src/mixins/SharesMixin.js @@ -229,7 +229,13 @@ export default { const properties = {} // force value to string because that is what our // share api controller accepts - propertyNames.map(p => (properties[p] = this.share[p].toString())) + propertyNames.forEach(name => { + if ((typeof this.share[name]) === 'object') { + properties[name] = JSON.stringify(this.share[name]) + } else { + properties[name] = this.share[name].toString() + } + }) this.updateQueue.add(async () => { this.saving = true |