]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove encryption option for nextcloud external storage 22343/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Thu, 20 Aug 2020 14:28:03 +0000 (16:28 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Thu, 20 Aug 2020 16:31:50 +0000 (16:31 +0000)
Fixes #16017

Since it never worked we should not show it.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
apps/files_external/js/settings.js

index adf3f766202e1c6c094524e0dbe7c8b35992461d..49238daffd63e866a0ac5deb676f91f345861303 100644 (file)
@@ -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);