From 96e987bbfaafbd323455398310782fb6eaa42e2f Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Mon, 29 Jul 2013 17:42:49 -0400 Subject: [PATCH] Use inputTypes from plugins to determine valid input types Signed-off-by: Shea Levy --- src/lib/Hydra/Controller/Jobset.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm index 2b760103..f1fed9dc 100644 --- a/src/lib/Hydra/Controller/Jobset.pm +++ b/src/lib/Hydra/Controller/Jobset.pm @@ -328,10 +328,8 @@ sub updateJobset { error($c, "Invalid input name: $inputName") unless $inputName =~ /^[[:alpha:]]\w*$/; my $inputType = $inputData->{type}; - error($c, "Invalid input type: $inputType") unless - $inputType eq "svn" || $inputType eq "svn-checkout" || $inputType eq "hg" || $inputType eq "tarball" || - $inputType eq "string" || $inputType eq "path" || $inputType eq "boolean" || $inputType eq "bzr" || $inputType eq "bzr-checkout" || - $inputType eq "git" || $inputType eq "build" || $inputType eq "sysbuild" ; + + error($c, "Invalid input type: $inputType") unless defined $c->stash->{inputTypes}->{$inputType}; my $input; unless (defined $inputData->{oldName}) {