Skip to content

Commit

Permalink
Merge pull request #22343 from nextcloud/backport/22335/stable18
Browse files Browse the repository at this point in the history
[stable18] Remove encryption option for nextcloud external storage
  • Loading branch information
rullzer authored Aug 21, 2020
2 parents 81d5e85 + bf37e4a commit e1647c6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions apps/files_external/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e1647c6

Please sign in to comment.