ServiceController: enforce optional monitoring...

...module permissions
This commit is contained in:
Thomas Gelf 2021-10-05 23:31:13 +02:00
parent 8ec56ff16e
commit ab28a4b1db
1 changed files with 3 additions and 1 deletions

View File

@ -28,7 +28,9 @@ class ServiceController extends ObjectController
{
if ($this->hasPermission('director/monitoring/services')) {
$monitoring = new Monitoring();
return $monitoring->authCanEditService($this->Auth(), $this->getParam('host'), $this->getParam('name'));
if ($monitoring->authCanEditService($this->Auth(), $this->getParam('host'), $this->getParam('name'))) {
return;
}
}
$this->assertPermission('director/hosts');
}