From f6cc2eed3b7cc981facb06e65c571062bbe8c474 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" Date: Wed, 30 Mar 2005 10:16:23 +0000 Subject: [PATCH] Bug 286003: Direct access to summarize-time.cgi when time tracking is off generates an error - Patch by Shane H. W. Travis r=jouni a=justdave --- webtools/bugzilla/summarize_time.cgi | 6 ++++-- .../template/en/default/global/user-error.html.tmpl | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/webtools/bugzilla/summarize_time.cgi b/webtools/bugzilla/summarize_time.cgi index 6ea31fceb0e..077678c2e6f 100755 --- a/webtools/bugzilla/summarize_time.cgi +++ b/webtools/bugzilla/summarize_time.cgi @@ -360,8 +360,10 @@ my $cgi = Bugzilla->cgi; Bugzilla->switch_to_shadow_db(); -ThrowUserError("timetracking_access_denied") unless - UserInGroup(Param("timetrackinggroup")); +UserInGroup(Param("timetrackinggroup")) + || ThrowUserError("auth_failure", {group => "time-tracking", + action => "access", + object => "timetracking_summaries"}); my @ids = split(",", $cgi->param('id')); map { ValidateBugID($_) } @ids; diff --git a/webtools/bugzilla/template/en/default/global/user-error.html.tmpl b/webtools/bugzilla/template/en/default/global/user-error.html.tmpl index 0821fbcd37f..92bc5299039 100644 --- a/webtools/bugzilla/template/en/default/global/user-error.html.tmpl +++ b/webtools/bugzilla/template/en/default/global/user-error.html.tmpl @@ -160,6 +160,8 @@ whine reports [% ELSIF object == "sanity_check" %] a sanity check + [% ELSIF object == "timetracking_summaries" %] + time-tracking summary reports [% ELSIF object == "user" %] the user you specified [% ELSIF object == "users" %]