From: Robin Appelman Date: Tue, 26 Jan 2016 12:22:27 +0000 (+0100) Subject: minor fixes X-Git-Tag: v9.0beta1~147^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=efcf790eff211afc220e298383874733fb907181;p=nextcloud-server.git minor fixes --- diff --git a/apps/files_external/controller/userglobalstoragescontroller.php b/apps/files_external/controller/userglobalstoragescontroller.php index 5031d3c46bd..6b39b3dc92d 100644 --- a/apps/files_external/controller/userglobalstoragescontroller.php +++ b/apps/files_external/controller/userglobalstoragescontroller.php @@ -23,7 +23,6 @@ namespace OCA\Files_External\Controller; use OCA\Files_External\Lib\Auth\AuthMechanism; use OCA\Files_External\Lib\Auth\IUserProvided; -use OCA\Files_External\Lib\Auth\Password\UserProvided; use OCA\Files_External\Lib\InsufficientDataForMeaningfulAnswerException; use \OCP\IRequest; use \OCP\IL10N; @@ -186,11 +185,11 @@ class UserGlobalStoragesController extends StoragesController { $storage->setBackendOptions([]); $storage->setMountOptions([]); - if ($storage->getAuthMechanism() instanceof UserProvided) { + if ($storage->getAuthMechanism() instanceof IUserProvided) { try { $storage->getAuthMechanism()->manipulateStorageConfig($storage, $this->userSession->getUser()); } catch (InsufficientDataForMeaningfulAnswerException $e) { - + // not configured yet } } } diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 94d0fc2f5a7..ccb1e858fa0 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -206,6 +206,12 @@ StorageConfig.Status = { ERROR: 1, INDETERMINATE: 2 }; +StorageConfig.Visibility = { + NONE: 0, + PERSONAL: 1, + ADMIN: 2, + DEFAULT: 3 +}; /** * @memberof OCA.External.Settings */ @@ -809,7 +815,7 @@ MountConfigListView.prototype = _.extend({ $tr.find('.backend').data('identifier', backend.identifier); var selectAuthMechanism = $(''); - var neededVisibility = (this._isPersonal) ? 1 : 2; + var neededVisibility = (this._isPersonal) ? StorageConfig.Visibility.PERSONAL : StorageConfig.Visibility.ADMIN; $.each(this._allAuthMechanisms, function(authIdentifier, authMechanism) { if (backend.authSchemes[authMechanism.scheme] && (authMechanism.visibility & neededVisibility)) { selectAuthMechanism.append( @@ -887,7 +893,6 @@ MountConfigListView.prototype = _.extend({ var onCompletion = jQuery.Deferred(); $.each(result, function(i, storageParams) { var storageConfig; - console.log(storageParams); var isUserGlobal = storageParams.type === 'system' && self._isPersonal; storageParams.mountPoint = storageParams.mountPoint.substr(1); // trim leading slash if (isUserGlobal) { @@ -970,7 +975,7 @@ MountConfigListView.prototype = _.extend({ var newElement; var trimmedPlaceholder = placeholder; - var flags = ['@', '*', '!', '#', '&']; + var flags = ['@', '*', '!', '#', '&']; // used to determine what kind of parameter while(flags.indexOf(trimmedPlaceholder[0]) !== -1) { trimmedPlaceholder = trimmedPlaceholder.substr(1); } diff --git a/apps/files_external/lib/failedcache.php b/apps/files_external/lib/failedcache.php index e646e4fe677..9e24c12f4b5 100644 --- a/apps/files_external/lib/failedcache.php +++ b/apps/files_external/lib/failedcache.php @@ -1,6 +1,6 @@ + * @author Robin Appelman * * @copyright Copyright (c) 2016, ownCloud, Inc. * @license AGPL-3.0