From d26bc5f16b26e6e28d1ce952f7f6fd2c36e88411 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Mon, 5 Feb 2007 00:23:20 +0000 Subject: Bug 358354: WebService should perform a login in xmlrpc.cgi Patch By Max Kanat-Alexander r=LpSolit, a=mkanat --- Bugzilla/WebService/Constants.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Bugzilla/WebService/Constants.pm') diff --git a/Bugzilla/WebService/Constants.pm b/Bugzilla/WebService/Constants.pm index d1f816c84..39d25298d 100755 --- a/Bugzilla/WebService/Constants.pm +++ b/Bugzilla/WebService/Constants.pm @@ -27,6 +27,8 @@ use base qw(Exporter); ERROR_AUTH_NODATA ERROR_UNIMPLEMENTED + + LOGIN_EXEMPT ); # This maps the error names in global/*-error.html.tmpl to numbers. @@ -98,4 +100,13 @@ use constant ERROR_AUTH_NODATA => 410; use constant ERROR_UNIMPLEMENTED => 910; use constant ERROR_GENERAL => 999; +# For some methods, we shouldn't call Bugzilla->login before we call them. +# This is a hash--package names pointing to an arrayref of method names. +use constant LOGIN_EXEMPT => { + # Callers may have to know the Bugzilla version before logging in, + # even on a requirelogin installation. + Bugzilla => ['version'], + User => ['offer_account_by_email', 'login'], +}; + 1; -- cgit v1.2.3-24-g4f1b