Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
d26bc5f1
Commit
d26bc5f1
authored
Feb 05, 2007
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 358354: WebService should perform a login in xmlrpc.cgi
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat
parent
5d158911
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
3 deletions
+19
-3
WebService.pm
Bugzilla/WebService.pm
+7
-0
Constants.pm
Bugzilla/WebService/Constants.pm
+11
-0
User.pm
Bugzilla/WebService/User.pm
+0
-3
xmlrpc.cgi
xmlrpc.cgi
+1
-0
No files found.
Bugzilla/WebService.pm
View file @
d26bc5f1
...
...
@@ -41,6 +41,13 @@ sub datetime_format {
return
$iso_datetime
;
}
sub
handle_login
{
my
(
$self
,
$module
,
$method
)
=
@_
;
my
$exempt
=
LOGIN_EXEMPT
->
{
$module
};
return
if
$exempt
&&
grep
{
$_
eq
$method
}
@$exempt
;
Bugzilla
->
login
;
}
package
Bugzilla::WebService::XMLRPC::Transport::HTTP::
CGI
;
use
strict
;
...
...
Bugzilla/WebService/Constants.pm
View file @
d26bc5f1
...
...
@@ -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
;
Bugzilla/WebService/User.pm
View file @
d26bc5f1
...
...
@@ -60,10 +60,7 @@ sub login {
sub
logout
{
my
$self
=
shift
;
Bugzilla
->
login
(
LOGIN_OPTIONAL
);
Bugzilla
->
logout
;
return
undef
;
}
...
...
xmlrpc.cgi
View file @
d26bc5f1
...
...
@@ -35,4 +35,5 @@ my $response = Bugzilla::WebService::XMLRPC::Transport::HTTP::CGI
'User'
=>
'Bugzilla::WebService::User'
,
'Product'
=>
'Bugzilla::WebService::Product'
,
})
->
on_action
(
\&
Bugzilla::WebService::
handle_login
)
->
handle
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment