ServiceController: Use given properties to get host/service name

This commit is contained in:
Sukhwinder Dhillon 2023-11-30 15:28:29 +01:00
parent 4ef7f5664a
commit d26a619577
1 changed files with 4 additions and 1 deletions

View File

@ -29,7 +29,10 @@ class ServiceController extends ObjectController
protected function checkDirectorPermissions()
{
if ($this->backend()->canModifyService($this->getParam('host'), $this->getParam('name'))) {
if ($this->host
&& $this->object
&& $this->backend()->canModifyService($this->host->getObjectName(), $this->object->getObjectName())
) {
return;
}