diff options
author | Robin McCorkell <rmccorkell@owncloud.com> | 2015-09-13 22:41:07 +0100 |
---|---|---|
committer | Robin McCorkell <rmccorkell@owncloud.com> | 2015-09-13 22:41:07 +0100 |
commit | c15ba0d6589863e546df2476778fbd305d0c3fdd (patch) | |
tree | 08d62f40ecc94e94ca327f115e78ae3a1b099793 /apps/files_external | |
parent | 0dc71813354407fad8fa1db113d75cad78dfc12f (diff) | |
parent | 522619f90e2855cf10ee16147a1c20cf24da689d (diff) | |
download | nextcloud-server-c15ba0d6589863e546df2476778fbd305d0c3fdd.tar.gz nextcloud-server-c15ba0d6589863e546df2476778fbd305d0c3fdd.zip |
Merge pull request #18996 from owncloud/ext-swift-dependencycheck
Fix dependency check for Swift and SMB_OC
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/lib/backend/smb_oc.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/backend/swift.php | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_external/lib/backend/smb_oc.php b/apps/files_external/lib/backend/smb_oc.php index 3621682fb8f..d21b0ddaf42 100644 --- a/apps/files_external/lib/backend/smb_oc.php +++ b/apps/files_external/lib/backend/smb_oc.php @@ -28,12 +28,15 @@ use \OCA\Files_External\Lib\Auth\AuthMechanism; use \OCA\Files_External\Service\BackendService; use \OCA\Files_External\Lib\Auth\Password\SessionCredentials; use \OCA\Files_External\Lib\StorageConfig; +use \OCA\Files_External\Lib\LegacyDependencyCheckPolyfill; /** * Deprecated SMB_OC class - use SMB with the password::sessioncredentials auth mechanism */ class SMB_OC extends Backend { + use LegacyDependencyCheckPolyfill; + public function __construct(IL10N $l, SessionCredentials $legacyAuth) { $this ->setIdentifier('\OC\Files\Storage\SMB_OC') @@ -48,7 +51,6 @@ class SMB_OC extends Backend { (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), ]) - ->setDependencyCheck('\OC\Files\Storage\SMB::checkDependencies') ->removeAllowedPermission(BackendService::USER_PERSONAL, BackendService::PERMISSION_CREATE) ->removeAllowedPermission(BackendService::USER_ADMIN, BackendService::PERMISSION_CREATE) ->setPriority(BackendService::PRIORITY_DEFAULT - 10) diff --git a/apps/files_external/lib/backend/swift.php b/apps/files_external/lib/backend/swift.php index c0ac7c08345..2e14855206c 100644 --- a/apps/files_external/lib/backend/swift.php +++ b/apps/files_external/lib/backend/swift.php @@ -28,9 +28,12 @@ use \OCA\Files_External\Lib\Auth\AuthMechanism; use \OCA\Files_External\Service\BackendService; use \OCA\Files_External\Lib\Auth\OpenStack\OpenStack; use \OCA\Files_External\Lib\Auth\OpenStack\Rackspace; +use \OCA\Files_External\Lib\LegacyDependencyCheckPolyfill; class Swift extends Backend { + use LegacyDependencyCheckPolyfill; + public function __construct(IL10N $l, OpenStack $openstackAuth, Rackspace $rackspaceAuth) { $this ->setIdentifier('swift') @@ -46,7 +49,6 @@ class Swift extends Backend { (new DefinitionParameter('timeout', $l->t('Request timeout (seconds)'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), ]) - ->setDependencyCheck('\OC\Files\Storage\Swift::checkDependencies') ->addAuthScheme(AuthMechanism::SCHEME_OPENSTACK) ->setLegacyAuthMechanismCallback(function(array $params) use ($openstackAuth, $rackspaceAuth) { if (isset($params['options']['key']) && $params['options']['key']) { |