Mark SMB_OC and SFTP_Key as deprecated backends

remotes/origin/db-empty-migrate
Robin McCorkell 9 years ago committed by Thomas Müller
parent 2bef3ef34b
commit 634c1c497c
  1. 6
      apps/files_external/lib/backend/sftp_key.php
  2. 6
      apps/files_external/lib/backend/smb_oc.php

@ -27,14 +27,15 @@ use \OCA\Files_External\Lib\DefinitionParameter;
use \OCA\Files_External\Lib\Auth\AuthMechanism;
use \OCA\Files_External\Service\BackendService;
use \OCA\Files_External\Lib\Auth\PublicKey\RSA;
use \OCA\Files_External\Lib\Backend\SFTP;
class SFTP_Key extends Backend {
public function __construct(IL10N $l, RSA $legacyAuth) {
public function __construct(IL10N $l, RSA $legacyAuth, SFTP $sftpBackend) {
$this
->setIdentifier('\OC\Files\Storage\SFTP_Key')
->setStorageClass('\OC\Files\Storage\SFTP')
->setText($l->t('SFTP with secret key login [DEPRECATED]'))
->setText($l->t('SFTP with secret key login'))
->addParameters([
(new DefinitionParameter('host', $l->t('Host'))),
(new DefinitionParameter('root', $l->t('Remote subfolder')))
@ -42,6 +43,7 @@ class SFTP_Key extends Backend {
])
->addAuthScheme(AuthMechanism::SCHEME_PUBLICKEY)
->setLegacyAuthMechanism($legacyAuth)
->deprecateTo($sftpBackend)
;
}

@ -29,6 +29,7 @@ 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;
use \OCA\Files_External\Lib\Backend\SMB;
/**
* Deprecated SMB_OC class - use SMB with the password::sessioncredentials auth mechanism
@ -37,11 +38,11 @@ class SMB_OC extends Backend {
use LegacyDependencyCheckPolyfill;
public function __construct(IL10N $l, SessionCredentials $legacyAuth) {
public function __construct(IL10N $l, SessionCredentials $legacyAuth, SMB $smbBackend) {
$this
->setIdentifier('\OC\Files\Storage\SMB_OC')
->setStorageClass('\OC\Files\Storage\SMB')
->setText($l->t('SMB / CIFS using OC login [DEPRECATED]'))
->setText($l->t('SMB / CIFS using OC login'))
->addParameters([
(new DefinitionParameter('host', $l->t('Host'))),
(new DefinitionParameter('username_as_share', $l->t('Username as share')))
@ -54,6 +55,7 @@ class SMB_OC extends Backend {
->setPriority(BackendService::PRIORITY_DEFAULT - 10)
->addAuthScheme(AuthMechanism::SCHEME_PASSWORD)
->setLegacyAuthMechanism($legacyAuth)
->deprecateTo($smbBackend)
;
}

Loading…
Cancel
Save