Closed Bug 286003 Opened 20 years ago Closed 20 years ago

Direct access to summarize-time.cgi when time tracking is off generates an error

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: goobix, Assigned: shane.h.w.travis)

Details

Attachments

(1 file)

Direct access tosummarize-time.cgi when time tracking is off generates an error.

This is probably due to the following line:

+ThrowUserError("timetracking_access_denied") unless 
...

from the patch commited in bug 250410. There is no timetracking_access_denied
error in the user-error.html.tmpl template.

2.20 blocker, probably.
Target Milestone: --- → Bugzilla 2.20
Summary: Direct access tosummarize-time.cgi when time tracking is off generates an error → Direct access to summarize-time.cgi when time tracking is off generates an error
Assignee: create-and-change → travis
Status: NEW → ASSIGNED
Flags: blocking2.20?
Fixes this in a generic way, using the standard auth_failure error.
Attachment #177915 - Flags: review?
Comment on attachment 177915 [details] [diff] [review]
Code patch for tip

>-ThrowUserError("timetracking_access_denied") unless 
>-    UserInGroup(Param("timetrackinggroup"));
>+UserInGroup(Param("timetrackinggroup"));
>+    || ThrowUserError("auth_failure", {group  => "time-tracking",
>+                                       action => "access",
>+                                       object => "timetracking_summaries"});

Apart from the fact that this doesn't compile (what's that ; doing after
UserInGroup anyway), it's fine ;-)

Remove that extra semicolon and test it (I did, but still), and r=jouni.
Attachment #177915 - Flags: review? → review+
Flags: blocking2.20?
Flags: blocking2.20+
Flags: approval+
Checking in summarize_time.cgi;
/cvsroot/mozilla/webtools/bugzilla/summarize_time.cgi,v  <--  summarize_time.cgi
new revision: 1.5; previous revision: 1.4
done
Checking in template/en/default/global/user-error.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/user-error.html.tmpl,v
 <--  user-error.html.tmpl
new revision: 1.103; previous revision: 1.102
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: