Skip to content

Commit 779df24

Browse files
rullzerbackportbot[bot]
authored andcommitted
Remove encryption option for nextcloud external storage
Fixes #16017 Since it never worked we should not show it. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
1 parent 165905a commit 779df24

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)