IcingaEndpointForm: allow to choose API users

This commit is contained in:
Thomas Gelf 2015-12-17 14:39:28 +01:00
parent 08c3614620
commit 0da806cbf7
2 changed files with 10 additions and 0 deletions

View File

@ -49,6 +49,11 @@ class IcingaEndpointForm extends DirectorObjectForm
'description' => $this->translate('The log duration time.')
));
$this->addElement('select', 'apiuser_id', array(
'label' => $this->translate('API user'),
'multiOptions' => $this->optionalEnum($this->db->enumApiUsers())
));
$this->addZoneElement()
->addImportsElement();

View File

@ -390,6 +390,11 @@ class Db extends DbConnection
return $this->enumIcingaObjects('usergroup');
}
public function enumApiUsers()
{
return $this->enumIcingaObjects('apiuser');
}
public function enumSyncRule()
{
return $this->enum('sync_rule', array('id', 'rule_name'));