ConfigController: do not fail without a valid...

...deployment endpoint

refs #918
This commit is contained in:
Thomas Gelf 2017-09-28 20:18:25 +02:00
parent 9fd66dbe99
commit b50a360ff1
1 changed files with 6 additions and 4 deletions

View File

@ -150,10 +150,12 @@ class ConfigController extends ActionController
));
}
if ($this->hasPermission('director/deploy')) {
$this->actions()->add(DeployConfigForm::load()
->setDb($this->db())
->setApi($this->api())
->handleRequest());
if ($this->db()->hasDeploymentEndpoint()) {
$this->actions()->add(DeployConfigForm::load()
->setDb($this->db())
->setApi($this->api())
->handleRequest());
}
}
$table->renderTo($this);