From 0d3a72b793725118641c4d7abf511b4fc98f7aef Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 11 Nov 2006 00:51:27 +0000 Subject: Bug 189627: Implement per-product privileges - Patch by Frédéric Buclin r=mkanat a=myk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- enter_bug.cgi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'enter_bug.cgi') diff --git a/enter_bug.cgi b/enter_bug.cgi index 317bd6d0c..7f5a17e46 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -300,6 +300,9 @@ sub pickos { # End of subroutines ############################################################################## +my $has_editbugs = $user->in_group('editbugs', $product->id); +my $has_canconfirm = $user->in_group('canconfirm', $product->id); + # If a user is trying to clone a bug # Check that the user has authorization to view the parent bug # Create an instance of Bug that holds the info from the parent @@ -327,11 +330,11 @@ $vars->{'op_sys'} = get_legal_field_values('op_sys'); $vars->{'use_keywords'} = 1 if Bugzilla::Keyword::keyword_count(); $vars->{'assigned_to'} = formvalue('assigned_to'); -$vars->{'assigned_to_disabled'} = !Bugzilla->user->in_group('editbugs'); +$vars->{'assigned_to_disabled'} = !$has_editbugs; $vars->{'cc_disabled'} = 0; $vars->{'qa_contact'} = formvalue('qa_contact'); -$vars->{'qa_contact_disabled'} = !Bugzilla->user->in_group('editbugs'); +$vars->{'qa_contact_disabled'} = !$has_editbugs; $vars->{'cloned_bug_id'} = $cloned_bug_id; @@ -465,7 +468,7 @@ if ( Bugzilla->params->{'usetargetmilestone'} ) { # to let them mark bugs as ASSIGNED) my @status; -if ($user->in_group('editbugs') || $user->in_group('canconfirm')) { +if ($has_editbugs || $has_canconfirm) { @status = ('NEW', 'ASSIGNED'); } elsif (!$product->votes_to_confirm) { -- cgit v1.2.3-24-g4f1b