aboutsummaryrefslogtreecommitdiffstats
path: root/enter_bug.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-11-11 00:51:27 +0000
committerlpsolit%gmail.com <>2006-11-11 00:51:27 +0000
commit0d3a72b793725118641c4d7abf511b4fc98f7aef (patch)
treec5a7b0fbcb401fdc3a083bb94b0b6345962d0bac /enter_bug.cgi
parentbd49bafdb5915a8e738dcbb82c88e8ffdf65a769 (diff)
downloadbugs-0d3a72b793725118641c4d7abf511b4fc98f7aef.tar
bugs-0d3a72b793725118641c4d7abf511b4fc98f7aef.tar.gz
bugs-0d3a72b793725118641c4d7abf511b4fc98f7aef.tar.bz2
bugs-0d3a72b793725118641c4d7abf511b4fc98f7aef.tar.xz
bugs-0d3a72b793725118641c4d7abf511b4fc98f7aef.zip
Bug 189627: Implement per-product privileges - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
Diffstat (limited to 'enter_bug.cgi')
-rwxr-xr-xenter_bug.cgi9
1 files changed, 6 insertions, 3 deletions
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) {