From 298bffb5b496415b2f42d705e3d0fb4038a19194 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 26 Aug 2006 03:19:44 +0000 Subject: =?UTF-8?q?Bug=20350181:=20Check=20whether=20the=20requestee=20is?= =?UTF-8?q?=20allowed=20to=20set=20a=20flag=20-=20Patch=20by=20Fr=C3=A9d?= =?UTF-8?q?=C3=A9ric=20Buclin=20=20a=3Dmyk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Flag.pm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Bugzilla') 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}); + } } } -- cgit v1.2.1