Skip to content

Commit

Permalink
fix #333 protection of private classes is wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
lbetz committed Jul 10, 2017
1 parent accd856 commit 48fd23e
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
class icinga2::config {

if defined($caller_module_name) and $module_name != $caller_module_name {
if !defined($caller_module_name) or $module_name != $caller_module_name {
fail("icinga2::config is a private class of the module icinga2, you're not permitted to use it.")
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/debian/dbconfig.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$ssl = false,
) {

if defined($caller_module_name) and $module_name != $caller_module_name and $caller_module_name != '' {
if !defined($caller_module_name) or $module_name != $caller_module_name {
fail("icinga2::debian::dbconfig is a private define resource of the module icinga2, you're not permitted to use it.")
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/feature.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$feature = $title,
) {

if defined($caller_module_name) and $module_name != $caller_module_name and $caller_module_name != '' {
if !defined($caller_module_name) or $module_name != $caller_module_name {
fail("icinga2::feature is a private define resource of the module icinga2, you're not permitted to use it.")
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
class icinga2::install {

if defined($caller_module_name) and $module_name != $caller_module_name {
if !defined($caller_module_name) or $module_name != $caller_module_name {
fail("icinga2::install is a private class of the module icinga2, you're not permitted to use it.")
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/object.pp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
$attrs = {},
) {

if defined($caller_module_name) and $module_name != $caller_module_name and $caller_module_name != '' {
if !defined($caller_module_name) or $module_name != $caller_module_name {
fail("icinga2::object is a private define resource of the module icinga2, you're not permitted to use it.")
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
class icinga2::repo {

if defined($caller_module_name) and $module_name != $caller_module_name {
if !defined($caller_module_name) or $module_name != $caller_module_name {
fail("icinga2::repo is a private class of the module icinga2, you're not permitted to use it.")
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
class icinga2::service {

if defined($caller_module_name) and $module_name != $caller_module_name {
if !defined($caller_module_name) or $module_name != $caller_module_name {
fail("icinga2::service is a private class of the module icinga2, you're not permitted to use it.")
}

Expand Down

0 comments on commit 48fd23e

Please sign in to comment.