]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 308581: Excluding yourself from a restricted bug generates an error if the user...
authorlpsolit%gmail.com <>
Thu, 15 Sep 2005 17:50:04 +0000 (17:50 +0000)
committerlpsolit%gmail.com <>
Thu, 15 Sep 2005 17:50:04 +0000 (17:50 +0000)
process_bug.cgi

index e61834bb208229564215abd304cd5b7d24e850ac..e98005a9cbc97e3a9f65e744d2b23f240454bbb5 100755 (executable)
@@ -1959,15 +1959,17 @@ if ($action eq 'next_bug') {
         }
     }
 } elsif ($action eq 'same_bug') {
-    my $bug = new Bugzilla::Bug($cgi->param('id'), $whoid);
-    ThrowCodeError("bug_error", { bug => $bug }) if $bug->error;
+    if (Bugzilla->user->can_see_bug($cgi->param('id'))) {
+        my $bug = new Bugzilla::Bug($cgi->param('id'), $whoid);
+        ThrowCodeError("bug_error", { bug => $bug }) if $bug->error;
 
-    $vars->{'bugs'} = [$bug];
+        $vars->{'bugs'} = [$bug];
 
-    $template->process("bug/show.html.tmpl", $vars)
-      || ThrowTemplateError($template->error());
+        $template->process("bug/show.html.tmpl", $vars)
+          || ThrowTemplateError($template->error());
 
-    exit;
+        exit;
+    }
 } elsif ($action ne 'nothing') {
     ThrowCodeError("invalid_post_bug_submit_action");
 }