Commit 00ef09c5 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

Merge branch 'feature/unused-ter-service-functionality' into 'develop'

[TASK] Simplify TerService connection in EXT:ter_fe2

See merge request t3o/ter!565
parents fbb4b194 86232c19
Pipeline #9563 passed with stages
in 8 minutes and 41 seconds
......@@ -95,11 +95,6 @@ abstract class AbstractTerBasedController extends \T3o\TerFe2\Controller\Abstrac
*/
protected function getTerConnection()
{
if (empty($this->terSettings['httpAuth'])) {
$this->terSettings['httpAuth'] = [];
}
// Create connection
return $this->objectManager->get(\T3o\TerFe2\Service\TerService::class, $this->terAccount['username'], $this->terAccount['password'], $this->terSettings['httpAuth']);
return $this->objectManager->get(\T3o\TerFe2\Service\TerService::class, $this->terAccount['username'], $this->terAccount['password']);
}
}
......@@ -38,9 +38,8 @@ class TerService
*
* @param string $username
* @param string $password
* @param array $httpAuth
*/
public function __construct($username, $password, array $httpAuth = [])
public function __construct($username, $password)
{
$this->userData = new \stdClass();
$this->userData->username = $username;
......@@ -188,34 +187,4 @@ class TerService
return true;
}
/**
* Returns an array of the users extensions
*
* @param $error
* @return bool
*/
public function getExtensionKeysByUser(&$error)
{
$parameter = new \stdClass();
$parameter->username = $this->userData['username'];
$response = $this->terApi->getExtensionKeys($this->userData, $parameter);
$result = $response['simpleResult'];
$extensionKeys = $response['extensionKeyData'];
if (empty($result['resultCode'])) {
$error = 'no_result';
return false;
}
if ($result['resultCode'] === ResultCodes::ERROR_GENERAL_USERNOTFOUND) {
$error = 'user_not_found';
return false;
}
if ($result['resultCode'] !== ResultCodes::RESULT_GENERAL_OK) {
$error = 'user_not_found';
return false;
}
return $extensionKeys;
}
}
......@@ -43,22 +43,11 @@ plugin.tx_terfe2 {
onlyLatestVersionZip = 1
terConnection {
# cat=TER Frontend/settings/2000; type=string; label=TER WSDL URI: WSDL URI to connect TER server
wsdl = http://typo3.org/wsdl/tx_ter_wsdl.php
# cat=TER Frontend/settings/2010; type=string; label=TER Username: Username to connect TER server
username =
# cat=TER Frontend/settings/2020; type=string; label=TER Password: Password to connect TER server
password =
httpAuth {
# cat=TER Frontend/settings/2030; type=string; label=HTTP Auth login: Login for HTTP Auth
login =
# cat=TER Frontend/settings/2040; type=string; label=HTTP Auth password: Password for HTTP Auth
password =
}
}
smallImage {
......
......@@ -21,13 +21,8 @@ plugin.tx_terfe2 {
terAdminGroupUid = {$plugin.tx_ter_pi1.adminFrontendUsergroupUid}
terConnection {
wsdl = {$plugin.tx_terfe2.settings.terConnection.wsdl}
username = {$plugin.tx_terfe2.settings.terConnection.username}
password = {$plugin.tx_terfe2.settings.terConnection.password}
httpAuth {
login = {$plugin.tx_terfe2.settings.terConnection.httpAuth.login}
password = {$plugin.tx_terfe2.settings.terConnection.httpAuth.password}
}
}
smallImage {
......
......@@ -657,9 +657,6 @@
<trans-unit id="registerkey.version_deleted" xml:space="preserve">
<source>Version %s of Extension %s deleted.</source>
</trans-unit>
<trans-unit id="registerkey.noWsdl" xml:space="preserve">
<source>No WSDL URI configured to connect to TER server</source>
</trans-unit>
<trans-unit id="registerkey.transferError.title" xml:space="preserve">
<source>Error transfering the extension %s</source>
</trans-unit>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment