mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-26 11:19:16 +02:00
EndpointController: remove peer detection
This commit is contained in:
parent
b6a8ce7acc
commit
017f4b09d1
@ -9,7 +9,7 @@ class EndpointController extends ObjectController
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
if ($this->isPeer()) {
|
||||
if ($this->object && $this->object->hasApiUser()) {
|
||||
$params['endpoint'] = $this->object->object_name;
|
||||
|
||||
$this->getTabs()->add('inspect', array(
|
||||
@ -19,19 +19,4 @@ class EndpointController extends ObjectController
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
protected function isPeer()
|
||||
{
|
||||
if (! $this->object) return false;
|
||||
|
||||
$apiconfig = $this->Config()->getSection('api');
|
||||
$host = $apiconfig->get('address');
|
||||
$port = $apiconfig->get('port');
|
||||
|
||||
if ($host === $this->object->host
|
||||
&& $port === $this->object->port
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user