with LDAP server set offline, config cannot be controlled via ocs anymore

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2019-03-05 12:53:13 +01:00
parent 5dd2207c95
commit dfc7007242
No known key found for this signature in database
GPG key ID: 7424F1874854DF23

View file

@ -27,6 +27,7 @@ use PHPUnit\Framework\Assert;
class LDAPContext implements Context {
use BasicStructure;
use CommandLine;
protected $configID;
@ -37,6 +38,8 @@ class LDAPContext implements Context {
if($this->configID === null) {
return;
}
$this->disableLDAPConfiguration(); # via occ in case of big config issues
$this->asAn('admin');
$this->sendingTo('DELETE', $this->apiUrl . '/' . $this->configID);
}
@ -196,4 +199,9 @@ class LDAPContext implements Context {
$backend = (string)simplexml_load_string($this->response->getBody())->data[0]->backend;
Assert::assertEquals('LDAP', $backend);
}
public function disableLDAPConfiguration() {
$configKey = $this->configID . 'ldap_configuration_active';
$this->invokingTheCommand('config:app:set user_ldap ' . $configKey . ' --value="0"');
}
}