From 97dbc79c16ba9d4d6c361d6f397908ef7893954d Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Wed, 12 Aug 2015 09:21:09 +0100 Subject: Compatibility shims for OC_Mount_Config The following functions have been removed: - addMountPoint() - removeMountPoint() - movePersonalMountPoint() registerBackend() has been rewritten as a shim around BackendService, allowing legacy code to interact with the new API seamlessly addMountPoint() was already disconnected from all production code, so this commit completes the job and removes the function itself, along with disconnecting and removing related functions. Unit tests have likewise been removed. getAbsoluteMountPoints(), getSystemMountPoints() and getPersonalMountPoints() have been rewritten to use the StoragesServices --- apps/files_external/lib/auth/authmechanism.php | 1 + apps/files_external/lib/auth/builtin.php | 41 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 apps/files_external/lib/auth/builtin.php (limited to 'apps/files_external/lib/auth') diff --git a/apps/files_external/lib/auth/authmechanism.php b/apps/files_external/lib/auth/authmechanism.php index a89ee823d51..11d99bb330d 100644 --- a/apps/files_external/lib/auth/authmechanism.php +++ b/apps/files_external/lib/auth/authmechanism.php @@ -51,6 +51,7 @@ class AuthMechanism implements \JsonSerializable { /** Standard authentication schemes */ const SCHEME_NULL = 'null'; + const SCHEME_BUILTIN = 'builtin'; const SCHEME_PASSWORD = 'password'; const SCHEME_OAUTH1 = 'oauth1'; const SCHEME_OAUTH2 = 'oauth2'; diff --git a/apps/files_external/lib/auth/builtin.php b/apps/files_external/lib/auth/builtin.php new file mode 100644 index 00000000000..ee28a4e8a5c --- /dev/null +++ b/apps/files_external/lib/auth/builtin.php @@ -0,0 +1,41 @@ + + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see + * + */ + +namespace OCA\Files_External\Lib\Auth; + +use \OCP\IL10N; +use \OCA\Files_External\Lib\Auth\AuthMechanism; +use \OCA\Files_external\Lib\StorageConfig; + +/** + * Builtin authentication mechanism, for legacy backends + */ +class Builtin extends AuthMechanism { + + public function __construct(IL10N $l) { + $this + ->setIdentifier('builtin::builtin') + ->setScheme(self::SCHEME_BUILTIN) + ->setText($l->t('Builtin')) + ; + } + +} -- cgit v1.2.3