diff options
author | Jesús Macias <jmacias@solidgear.es> | 2015-12-03 12:28:52 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-02-04 16:33:08 +0100 |
commit | 8fa96435b0bda96a8e7082928d0ce0b2d54383aa (patch) | |
tree | aa654edc43aa722f2d921d7fce906587d75bbc06 /apps/files_external/lib | |
parent | 089b60cd255ecfc7b25c2f5b36179c2bdc46bcf6 (diff) | |
download | nextcloud-server-8fa96435b0bda96a8e7082928d0ce0b2d54383aa.tar.gz nextcloud-server-8fa96435b0bda96a8e7082928d0ce0b2d54383aa.zip |
Add credentials dialog for user provided auth
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r-- | apps/files_external/lib/smb.php | 13 | ||||
-rw-r--r-- | apps/files_external/lib/storageconfig.php | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index 9da21dc88e6..50bd56f28ad 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -314,4 +314,17 @@ class SMB extends Common { || Server::NativeAvailable() ) ? true : ['smbclient']; } + + /** + * Test a storage for availability + * + * @return bool + */ + public function test() { + try { + return parent::test(); + } catch (Exception $e) { + return false; + } + } } diff --git a/apps/files_external/lib/storageconfig.php b/apps/files_external/lib/storageconfig.php index 7f716893842..6f44b25a2e6 100644 --- a/apps/files_external/lib/storageconfig.php +++ b/apps/files_external/lib/storageconfig.php @@ -24,6 +24,7 @@ namespace OCA\Files_external\Lib; +use OCA\Files_External\Lib\Auth\IUserProvided; use \OCA\Files_External\Lib\Backend\Backend; use \OCA\Files_External\Lib\Auth\AuthMechanism; @@ -406,6 +407,7 @@ class StorageConfig implements \JsonSerializable { if (!is_null($this->statusMessage)) { $result['statusMessage'] = $this->statusMessage; } + $result['userProvided'] = $this->authMechanism instanceof IUserProvided; $result['type'] = ($this->getType() === self::MOUNT_TYPE_PERSONAl) ? 'personal': 'system'; return $result; } |