Bug 282574 : use the new "auth_failure" error message for all authentication failures

Patch by Frederic Buclin <LpSolit@gmail.com>   r=travis, wurblzap  a=myk


git-svn-id: svn://10.0.0.236/trunk@170439 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
travis%sedsystems.ca
2005-03-09 16:18:03 +00:00
parent e4b7f01950
commit 7f544517dc
6 changed files with 35 additions and 35 deletions

View File

@@ -204,9 +204,10 @@ sub validateID
# Make sure the user is authorized to access this attachment's bug.
($bugid, my $isprivate) = FetchSQLData();
ValidateBugID($bugid);
if (($isprivate > 0 ) && Param("insidergroup") &&
!(UserInGroup(Param("insidergroup")))) {
ThrowUserError("attachment_access_denied");
if ($isprivate && Param("insidergroup")) {
UserInGroup(Param("insidergroup"))
|| ThrowUserError("auth_failure", {action => "access",
object => "attachment"});
}
# XXX shim code, kill $::FORM