From 7c5c4bbed57a04027e42e34fab5dc53ce13ba89b Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" Date: Thu, 15 Sep 2005 10:50:04 +0000 Subject: [PATCH] Bug 308581: Excluding yourself from a restricted bug generates an error if the user pref is set to "show the updated bug" - Patch by byron jones (glob) r=LpSolit a=justdave --- webtools/bugzilla/process_bug.cgi | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/webtools/bugzilla/process_bug.cgi b/webtools/bugzilla/process_bug.cgi index e61834bb208..e98005a9cbc 100755 --- a/webtools/bugzilla/process_bug.cgi +++ b/webtools/bugzilla/process_bug.cgi @@ -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"); }