summaryrefslogtreecommitdiffstats
path: root/os-plugins
diff options
context:
space:
mode:
authorOliver Tappe2008-05-21 12:08:15 +0200
committerOliver Tappe2008-05-21 12:08:15 +0200
commit1ff2bd49589e9d2de9339d6c477f079de6475010 (patch)
treea38d55f2c1b1f887599cb99ee4d10cbdd1f82fb8 /os-plugins
parent* added support to slxconfig for checking the given attribute values against (diff)
downloadcore-1ff2bd49589e9d2de9339d6c477f079de6475010.tar.gz
core-1ff2bd49589e9d2de9339d6c477f079de6475010.tar.xz
core-1ff2bd49589e9d2de9339d6c477f079de6475010.zip
* fixed bug in slxconfig introduced yesterday that would not allow setting
any attribute that has not come from a plugin (reported by Reiner) git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1779 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins')
-rw-r--r--os-plugins/OpenSLX/OSPlugin/Base.pm23
1 files changed, 4 insertions, 19 deletions
diff --git a/os-plugins/OpenSLX/OSPlugin/Base.pm b/os-plugins/OpenSLX/OSPlugin/Base.pm
index b4a3ad02..b89f73fa 100644
--- a/os-plugins/OpenSLX/OSPlugin/Base.pm
+++ b/os-plugins/OpenSLX/OSPlugin/Base.pm
@@ -188,7 +188,7 @@ Checks if the given value is allowed (and makes sense) for the given key.
If the value is ok, this method returns 1 - if not, it dies with an appropriate
message.
-Plugins may override this implementation to do additional checks that look
+Plugins may override this implementation to do checks that for instance look
at the vendor-OS (stage1-)attributes.
=cut
@@ -199,24 +199,9 @@ sub checkValueForKey
my $key = shift;
my $value = shift;
- # undefined values are always allowed
- return 1 if !defined $value;
-
- # the default implementation checks the value against the regex of the
- # attribute (if any)
- my $attrInfo
- = $self->getAttrInfo()->{$key}
- || die _tr('attribute "%s" is unknown!', $key);
-
- my $regex = $attrInfo->{content_regex};
- return 1 if !$regex;
-
- return 1 if $value =~ m{$regex};
-
- die _tr(
- "value given for attribute %s is not allowed.\nAllowed values are: %s",
- $key, $attrInfo->{content_descr}
- );
+ # this default implementation does no further checks (thus relying on the
+ # attributte regex check that is done in the AttributeRoster)
+ return 1;
}