summaryrefslogtreecommitdiffstats
path: root/config-db/OpenSLX
diff options
context:
space:
mode:
Diffstat (limited to 'config-db/OpenSLX')
-rw-r--r--config-db/OpenSLX/ConfigDB.pm12
-rw-r--r--config-db/OpenSLX/DBSchema.pm1
2 files changed, 11 insertions, 2 deletions
diff --git a/config-db/OpenSLX/ConfigDB.pm b/config-db/OpenSLX/ConfigDB.pm
index 9030311d..f4f9b0e2 100644
--- a/config-db/OpenSLX/ConfigDB.pm
+++ b/config-db/OpenSLX/ConfigDB.pm
@@ -1246,6 +1246,9 @@ sub setClientIDsOfSystem
my $systemID = shift;
my $clientIDs = _aref(shift);
+ # associating a client to the default system makes no sense
+ return 0 if $systemID == 0;
+
my @uniqueClientIDs = _unique(@$clientIDs);
return $self->{'meta-db'}->setClientIDsOfSystem(
@@ -1355,6 +1358,9 @@ sub setGroupIDsOfSystem
my $systemID = shift;
my $groupIDs = _aref(shift);
+ # associating a group to the default system makes no sense
+ return 0 if $systemID == 0;
+
my @uniqueGroupIDs = _unique(@$groupIDs);
return $self->{'meta-db'}->setGroupIDsOfSystem($systemID, \@uniqueGroupIDs);
@@ -1558,7 +1564,8 @@ sub setSystemIDsOfClient
my $clientID = shift;
my $systemIDs = _aref(shift);
- my @uniqueSystemIDs = _unique(@$systemIDs);
+ # filter out the default system, as no client should be associated to it
+ my @uniqueSystemIDs = grep { $_ > 0; } _unique(@$systemIDs);
return $self->{'meta-db'}->setSystemIDsOfClient(
$clientID, \@uniqueSystemIDs
@@ -1972,7 +1979,8 @@ sub setSystemIDsOfGroup
my $groupID = shift;
my $systemIDs = _aref(shift);
- my @uniqueSystemIDs = _unique(@$systemIDs);
+ # filter out the default system, as no group should be associated to it
+ my @uniqueSystemIDs = grep { $_ > 0; } _unique(@$systemIDs);
return $self->{'meta-db'}->setSystemIDsOfGroup($groupID, \@uniqueSystemIDs);
}
diff --git a/config-db/OpenSLX/DBSchema.pm b/config-db/OpenSLX/DBSchema.pm
index 81a68399..6600edca 100644
--- a/config-db/OpenSLX/DBSchema.pm
+++ b/config-db/OpenSLX/DBSchema.pm
@@ -260,6 +260,7 @@ if ($lang =~ m[^\w\w_(\w\w)]) {
{ # add default system
'id' => 0,
'name' => '<<<default>>>',
+ 'hidden' => 1,
'comment' => 'internal system that holds default values',
# system-only attributes:
'attr_ramfs_nicmods'