diff options
author | lpsolit%gmail.com <> | 2005-09-15 19:50:04 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-09-15 19:50:04 +0200 |
commit | b0fbfe878dd8194fbfb7c783e3e5498c50a2f8d9 (patch) | |
tree | 1d2ba94b4354df7a4f07df0507dcd3c208dd9472 /process_bug.cgi | |
parent | 9f118a0e690eda56322a8f3be119dc38d4ac70dd (diff) | |
download | bugzilla-b0fbfe878dd8194fbfb7c783e3e5498c50a2f8d9.tar.gz bugzilla-b0fbfe878dd8194fbfb7c783e3e5498c50a2f8d9.tar.xz |
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) <bugzilla@glob.com.au> r=LpSolit a=justdave
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-x | process_bug.cgi | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/process_bug.cgi b/process_bug.cgi index e61834bb2..e98005a9c 100755 --- a/process_bug.cgi +++ b/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"); } |