mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 16:14:09 +02:00
Fix config validation for templates used as object reference name
fixes #10830
This commit is contained in:
parent
a393c8213e
commit
323b759a90
@ -144,7 +144,12 @@ class DefaultValidationUtils : public ValidationUtils
|
|||||||
public:
|
public:
|
||||||
virtual bool ValidateName(const String& type, const String& name) const override
|
virtual bool ValidateName(const String& type, const String& name) const override
|
||||||
{
|
{
|
||||||
return ConfigItem::GetByTypeAndName(type, name) != ConfigItem::Ptr();
|
ConfigItem::Ptr item = ConfigItem::GetByTypeAndName(type, name);
|
||||||
|
|
||||||
|
if (!item || (item && item->IsAbstract()))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user