summaryrefslogtreecommitdiffstats
path: root/editparams.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'editparams.cgi')
-rwxr-xr-xeditparams.cgi10
1 files changed, 10 insertions, 0 deletions
diff --git a/editparams.cgi b/editparams.cgi
index cbce6405f..80b458d90 100755
--- a/editparams.cgi
+++ b/editparams.cgi
@@ -32,6 +32,7 @@ use Bugzilla::Config::Common;
use Bugzilla::Util;
use Bugzilla::Error;
use Bugzilla::Token;
+use Bugzilla::User;
my $user = Bugzilla->login(LOGIN_REQUIRED);
my $cgi = Bugzilla->cgi;
@@ -116,6 +117,15 @@ if ($action eq 'save' && $current_module) {
if ($ok ne "") {
ThrowUserError('invalid_parameter', { name => $name, err => $ok });
}
+ } elsif ($name eq 'globalwatchers') {
+ # can't check this as others, as Bugzilla::Config::Common
+ # can not use Bugzilla::User
+ foreach my $watcher (split(/[,\s]+/, $value)) {
+ ThrowUserError(
+ 'invalid_parameter',
+ { name => $name, err => "no such user $watcher" }
+ ) unless login_to_id($watcher);
+ }
}
push(@changes, $name);
SetParam($name, $value);