summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Flag.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-08-26 05:19:44 +0200
committerlpsolit%gmail.com <>2006-08-26 05:19:44 +0200
commit298bffb5b496415b2f42d705e3d0fb4038a19194 (patch)
treeca3085978d6f92f042f0870fd1c06aafefe344fb /Bugzilla/Flag.pm
parentf86bdf887f419be90115e641047c3f24d41d167f (diff)
downloadbugzilla-298bffb5b496415b2f42d705e3d0fb4038a19194.tar.gz
bugzilla-298bffb5b496415b2f42d705e3d0fb4038a19194.tar.xz
Bug 350181: Check whether the requestee is allowed to set a flag - Patch by Frédéric Buclin <LpSolit@gmail.com> a=myk
Diffstat (limited to 'Bugzilla/Flag.pm')
-rw-r--r--Bugzilla/Flag.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index de90170a3..b82165e80 100644
--- a/Bugzilla/Flag.pm
+++ b/Bugzilla/Flag.pm
@@ -414,6 +414,15 @@ sub _validate {
bug_id => $bug_id,
attach_id => $attach_id });
}
+
+ # Throw an error if the user won't be allowed to set the flag.
+ if ($flag_type->grant_group
+ && !$requestee->in_group_id($flag_type->grant_group->id))
+ {
+ ThrowUserError('flag_requestee_needs_privs',
+ {'requestee' => $requestee,
+ 'flagtype' => $flag_type});
+ }
}
}