From 9797547f955dde63dff188a625834eb338f319fa Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 30 Mar 2005 18:16:21 +0000 Subject: 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 --- summarize_time.cgi | 6 ++++-- template/en/default/global/user-error.html.tmpl | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/summarize_time.cgi b/summarize_time.cgi index 6ea31fceb..077678c2e 100755 --- a/summarize_time.cgi +++ b/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/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 0821fbcd3..92bc52990 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/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" %] -- cgit v1.2.3-24-g4f1b