Closed Bug 249930 Opened 20 years ago Closed 20 years ago

authorization_failure error message is not localizable

Categories

(Bugzilla :: Bugzilla-General, defect)

2.17.7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: justdave, Assigned: LpSolit)

References

Details

Attachments

(1 obsolete file)

from user-error.html.tmpl: [% ELSIF error == "authorization_failure" %] [% title = "Authorization Failed" %] You are not allowed to [% action FILTER html %]. Example usage: UserInGroup(Param("chartgroup")) || ThrowUserError("authorization_failure", {action => "use this feature"}); action ought to be a tag and pick the string as part of the error template
Depends on: 265898
chart.cgi and editflagtypes.cgi are the only 2 files using authorization_failure. This can easily be solved!
Till all *.cgi files are templatized, this is an easy workaround to this problem as only editflagtypes.cgi and chart.cgi use ThrowUserError("authorization_failure"). My suggestion for the future (well, it's only my opinion) is to have a common ThrowUserError("authorization_failure", { category => 'xxx'}) for all administrative pages, where 'xxx' would be e.g. 'flagtypes', 'groups', 'users',... This way, we would have more homogeneous error messages. That's why I opened bug 265898.
Assignee: justdave → LpSolit
Status: NEW → ASSIGNED
Comment on attachment 164855 [details] [diff] [review] modify ThrowUserError("authorization_failure") vladd, this seems a good solution until all *.cgi files are templatized, where we could then think about a common display for all error messages relative to administrative pages, as suggested in my previous comment.
Attachment #164855 - Flags: review?(vladd)
No longer depends on: 265898
Comment on attachment 164855 [details] [diff] [review] modify ThrowUserError("authorization_failure") Well this is a hack and I won't review+ it. :-) In the long term the right thing to do is to have one common part for generic auth_failure messages, and then the template should pick specific errors that give more details. Since any template change means a full cycle with translators involved and stuff, I'd like to keep the number of template changes to a minimum and get this right the first time. Especially since there are only two instances where this appears right now, and it's easy to do it right the first time. However, you might find another reviewer that will review this for 2.18 and justdave might take it in. :-) I'll be happy to review a patch doing the right thing :-)
Attachment #164855 - Flags: review?(vladd) → review?
justdave should read justdave or myk in the previous comment :-)
Comment on attachment 164855 [details] [diff] [review] modify ThrowUserError("authorization_failure") Removing request for review as my patch in bug 265898 should do a much better work.
Attachment #164855 - Flags: review?
Depends on: 265898
Whiteboard: [blocker will fix]
Target Milestone: --- → Bugzilla 2.22
Attachment #164855 - Attachment is obsolete: true
Fixed by my patch in bug 265898 as per my previous comment. Fixed!
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: [blocker will fix]
Target Milestone: Bugzilla 2.22 → Bugzilla 2.20
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: