diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-11-03 12:14:44 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-09-04 11:54:08 +0200 |
commit | 5df5b9c8b13770142eab82e889eed5e50da5fab3 (patch) | |
tree | 09891fdb160a0f21048b201e450b1b17f556ce22 /apps/files_external/js | |
parent | d21713d52627a267881b8a426aa613d3ac2d14d9 (diff) | |
download | nextcloud-server-5df5b9c8b13770142eab82e889eed5e50da5fab3.tar.gz nextcloud-server-5df5b9c8b13770142eab82e889eed5e50da5fab3.zip |
Handle invalid ext storage backend to keep mount point visible
Keep mount point visible and also ext storage config visible when
dealing with configs relating to storage backends or auth mechanisms
that were provided by an app that is currently disabled.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_external/js')
-rw-r--r-- | apps/files_external/js/settings.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 112676b8c27..30074ab179a 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -805,6 +805,13 @@ MountConfigListView.prototype = _.extend({ var mountPoint = storageConfig.mountPoint; var backend = this._allBackends[storageConfig.backend]; + if (!backend) { + backend = { + name: 'Unknown: ' + storageConfig.backend, + invalid: true + }; + } + // FIXME: Replace with a proper Handlebar template var $tr = this.$el.find('tr#addMountPoint'); this.$el.find('tbody').append($tr.clone()); @@ -829,6 +836,13 @@ MountConfigListView.prototype = _.extend({ $tr.addClass(backend.identifier); $tr.find('.backend').data('identifier', backend.identifier); + if (backend.invalid) { + $tr.find('[name=mountPoint]').prop('disabled', true); + $tr.find('.applicable,.mountOptionsToggle').empty(); + this.updateStatus($tr, false, 'Unknown backend: ' + backend.name); + return $tr; + } + var selectAuthMechanism = $('<select class="selectAuthMechanism"></select>'); var neededVisibility = (this._isPersonal) ? StorageConfig.Visibility.PERSONAL : StorageConfig.Visibility.ADMIN; $.each(this._allAuthMechanisms, function(authIdentifier, authMechanism) { |