Closed
Bug 249930
Opened 20 years ago
Closed 20 years ago
authorization_failure error message is not localizable
Categories
(Bugzilla :: Bugzilla-General, defect)
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
Assignee | ||
Comment 1•20 years ago
|
||
chart.cgi and editflagtypes.cgi are the only 2 files using
authorization_failure. This can easily be solved!
Assignee | ||
Comment 2•20 years ago
|
||
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 | ||
Updated•20 years ago
|
Assignee: justdave → LpSolit
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•20 years ago
|
||
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)
Comment 4•20 years ago
|
||
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?
Comment 5•20 years ago
|
||
justdave should read justdave or myk in the previous comment :-)
Assignee | ||
Comment 6•20 years ago
|
||
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?
Reporter | ||
Updated•20 years ago
|
Whiteboard: [blocker will fix]
Target Milestone: --- → Bugzilla 2.22
Assignee | ||
Updated•20 years ago
|
Attachment #164855 -
Attachment is obsolete: true
Assignee | ||
Comment 7•20 years ago
|
||
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
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•