Commit 1f1d6a5b authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 565881: 'flag_status_invalid' and 'request_queue_group_invalid' should be…

Bug 565881: 'flag_status_invalid' and 'request_queue_group_invalid' should be user errors, not code errors a=LpSolit
parent c42c5a57
......@@ -748,7 +748,7 @@ sub _check_status {
if (!grep($status eq $_ , qw(X + - ?))
|| ($status eq '?' && $self->status ne '?' && !$self->type->is_requestable))
{
ThrowCodeError('flag_status_invalid', { id => $self->id,
ThrowUserError('flag_status_invalid', { id => $self->id,
status => $status });
}
return $status;
......
......@@ -332,8 +332,7 @@ sub validateStatus {
return if !defined $status;
grep($status eq $_, qw(? +- + - all))
|| ThrowCodeError("flag_status_invalid",
{ status => $status });
|| ThrowUserError("flag_status_invalid", { status => $status });
trick_taint($status);
return $status;
}
......@@ -343,8 +342,7 @@ sub validateGroup {
return if !defined $group;
grep($group eq $_, qw(requester requestee category type))
|| ThrowCodeError("request_queue_group_invalid",
{ group => $group });
|| ThrowUserError("request_queue_group_invalid", { group => $group });
trick_taint($group);
return $group;
}
......
......@@ -277,13 +277,6 @@
You can't ask a specific person for
<em>[% type.name FILTER html %]</em>.
[% ELSIF error == "flag_status_invalid" %]
The flag status <em>[% status FILTER html %]</em>
[% IF id %]
for flag ID #[% id FILTER html %]
[% END %]
is invalid.
[% ELSIF error == "flag_type_inactive" %]
[% title = "Inactive Flag Type" %]
The flag type [% type FILTER html %] is inactive and cannot be used
......@@ -422,9 +415,6 @@
An error occurred while preparing for a RADIUS authentication request:
<code>[% errstr FILTER html %]</code>.
[% ELSIF error == "request_queue_group_invalid" %]
The group field <em>[% group FILTER html %]</em> is invalid.
[% ELSIF error == "report_axis_invalid" %]
<em>[% val FILTER html %]</em> is not a valid value for
[%+ IF fld == "x" %]the horizontal axis
......
......@@ -625,6 +625,14 @@
and the user you asked isn't in that group. Please choose someone else
to ask, or ask an administrator to add the user to the group.
[% ELSIF error == "flag_status_invalid" %]
[% title = "Flag Status Invalid" %]
The flag status <em>[% status FILTER html %]</em>
[% IF id %]
for flag ID #[% id FILTER html %]
[% END %]
is invalid.
[% ELSIF error == "flag_type_cc_list_invalid" %]
[% title = "Flag Type CC List Invalid" %]
[% admindocslinks = {'flags-overview.html#flags-admin' => 'Administering Flags'} %]
......@@ -1457,6 +1465,9 @@
for [% terms.bug %] [%+ bug_id FILTER html %]
has a circular dependency on [% terms.bug %] [%+ dep_id FILTER html %].
[% ELSIF error == "request_queue_group_invalid" %]
The group field <em>[% group FILTER html %]</em> is invalid.
[% ELSIF error == "require_new_password" %]
[% title = "New Password Needed" %]
You cannot change your password without choosing a new one.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment