diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-20 18:27:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-20 18:27:11 +0200 |
commit | d028423107061a4625d046bdd4d29bbfdf83839d (patch) | |
tree | 244bca4fc9a59265c656803e50e917e2031640c9 /apps/files_external | |
parent | 65b5e651851ce0270de2b5087dc42fd3aa7cae31 (diff) | |
parent | 85406bcaa58595eefa514cdbb2b25a1285afc7e7 (diff) | |
download | nextcloud-server-d028423107061a4625d046bdd4d29bbfdf83839d.tar.gz nextcloud-server-d028423107061a4625d046bdd4d29bbfdf83839d.zip |
Merge pull request #22335 from nextcloud/fix/16017/remove_nc_encryption
Remove encryption option for nextcloud external storage
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/js/settings.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index d6d8c1c7347..2470cb4c60a 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -475,7 +475,9 @@ MountOptionsDropdown.prototype = { })); this.$el = $el; - this.setOptions(mountOptions, visibleOptions); + var storage = $container[0].parentNode.className; + + this.setOptions(mountOptions, visibleOptions, storage); this.$el.appendTo($container); MountOptionsDropdown._last = this; @@ -523,7 +525,13 @@ MountOptionsDropdown.prototype = { * @param {Object} options mount options * @param {Array} visibleOptions enabled mount options */ - setOptions: function(options, visibleOptions) { + setOptions: function(options, visibleOptions, storage) { + if (storage === 'owncloud') { + var ind = visibleOptions.indexOf('encrypt'); + if (ind > 0) { + visibleOptions.splice(ind, 1); + } + } var $el = this.$el; _.each(options, function(value, key) { var $optionEl = $el.find('input, select').filterAttr('name', key); |