parent
0e10545175
commit
6490283647
|
@ -18,6 +18,11 @@ before switching to a new version.
|
|||
* FEATURE: Admins have now access to JSON download links in many places
|
||||
* FEATURE: Users equipped with related permissions can toggle "Show SQL" in the GUI
|
||||
|
||||
### Import and Sync
|
||||
* FIX: Sync is very powerful and allows for actions not available in the GUI. It
|
||||
however allowed to store invalid single Service Objects with no Host. This is
|
||||
now illegal, as it never makes any sense
|
||||
|
||||
1.4.1
|
||||
-----
|
||||
### Fixed issues
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
namespace Icinga\Module\Director\Objects;
|
||||
|
||||
use Icinga\Data\Filter\Filter;
|
||||
use Icinga\Exception\IcingaException;
|
||||
use Icinga\Exception\ProgrammingError;
|
||||
use Icinga\Module\Director\Db;
|
||||
use Icinga\Module\Director\Data\PropertiesFilter;
|
||||
|
@ -516,4 +517,17 @@ class IcingaService extends IcingaObject
|
|||
|
||||
return $properties;
|
||||
}
|
||||
|
||||
protected function beforeStore()
|
||||
{
|
||||
parent::beforeStore();
|
||||
if ($this->isObject()
|
||||
&& $this->get('service_set_id') === null
|
||||
&& $this->get('host_id') === null
|
||||
) {
|
||||
throw new IcingaException(
|
||||
'Cannot store a Service object without a related host'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue