ServiceController: Remove redudant if condition

This commit is contained in:
Sukhwinder Dhillon 2023-11-20 15:57:14 +01:00
parent 26f8769d28
commit 4e6528e862
1 changed files with 4 additions and 5 deletions

View File

@ -29,12 +29,11 @@ class ServiceController extends ObjectController
protected function checkDirectorPermissions()
{
if ($this->hasPermission(Permission::MONITORING_SERVICES)) {
if ($this->backend()->canModifyService($this->getParam('host'), $this->getParam('name'))) {
return;
}
if ($this->backend()->canModifyService($this->getParam('host'), $this->getParam('name'))) {
return;
}
$this->assertPermission('director/hosts');
$this->assertPermission(Permission::HOSTS);
}
public function init()