Skip to content

Commit 9c99245

Browse files
authored
Merge pull request #22341 from nextcloud/backport/22335/stable19
[stable19] Remove encryption option for nextcloud external storage
2 parents cb28b81 + 779df24 commit 9c99245

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

apps/files_external/js/settings.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,9 @@ MountOptionsDropdown.prototype = {
475475
}));
476476
this.$el = $el;
477477

478-
this.setOptions(mountOptions, visibleOptions);
478+
var storage = $container[0].parentNode.className;
479+
480+
this.setOptions(mountOptions, visibleOptions, storage);
479481

480482
this.$el.appendTo($container);
481483
MountOptionsDropdown._last = this;
@@ -523,7 +525,13 @@ MountOptionsDropdown.prototype = {
523525
* @param {Object} options mount options
524526
* @param {Array} visibleOptions enabled mount options
525527
*/
526-
setOptions: function(options, visibleOptions) {
528+
setOptions: function(options, visibleOptions, storage) {
529+
if (storage === 'owncloud') {
530+
var ind = visibleOptions.indexOf('encrypt');
531+
if (ind > 0) {
532+
visibleOptions.splice(ind, 1);
533+
}
534+
}
527535
var $el = this.$el;
528536
_.each(options, function(value, key) {
529537
var $optionEl = $el.find('input, select').filterAttr('name', key);

0 commit comments

Comments
 (0)