mirror of https://github.com/Icinga/icinga2.git
ConfigObject: Mark object names as required
This prevents a user from creating an object without a valid name such as `"", null`.
This commit is contained in:
parent
eb74898271
commit
148f5b8416
|
@ -57,7 +57,7 @@ private:
|
||||||
abstract class ConfigObject : ConfigObjectBase < ConfigType
|
abstract class ConfigObject : ConfigObjectBase < ConfigType
|
||||||
{
|
{
|
||||||
[config, no_user_modify] String __name (Name);
|
[config, no_user_modify] String __name (Name);
|
||||||
[config, no_user_modify] String "name" (ShortName) {
|
[config, no_user_modify, required] String "name" (ShortName) {
|
||||||
get {{{
|
get {{{
|
||||||
String shortName = m_ShortName.load();
|
String shortName = m_ShortName.load();
|
||||||
if (shortName.IsEmpty())
|
if (shortName.IsEmpty())
|
||||||
|
|
Loading…
Reference in New Issue