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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
6c6efdde
Commit
6c6efdde
authored
Jun 13, 2014
by
Simon Green
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1023633 - Add a webservice_before_call Hook
r=dkl, a=glob
parent
eb13c383
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
Server.pm
Bugzilla/WebService/Server.pm
+4
-0
Extension.pm
extensions/Example/Extension.pm
+14
-0
No files found.
Bugzilla/WebService/Server.pm
View file @
6c6efdde
...
...
@@ -28,6 +28,10 @@ sub handle_login {
return
if
(
$class
->
login_exempt
(
$method
)
and
!
defined
Bugzilla
->
input_params
->
{
Bugzilla_login
});
Bugzilla
->
login
();
Bugzilla::Hook::
process
(
'webservice_before_call'
,
{
'method'
=>
$method
,
full_method
=>
$full_method
});
}
sub
datetime_format_inbound
{
...
...
extensions/Example/Extension.pm
View file @
6c6efdde
...
...
@@ -949,6 +949,20 @@ sub webservice_error_codes {
$error_map
->
{
'example_my_error'
}
=
10001
;
}
sub
webservice_before_call
{
my
(
$self
,
$args
)
=
@_
;
# This code doesn't actually *do* anything, it's just here to show you
# how to use this hook.
my
$method
=
$args
->
{
method
};
my
$full_method
=
$args
->
{
full_method
};
# Uncomment this line to see a line in your webserver's error log whenever
# a webservice call is made
#warn "RPC call $full_method made by ",
# Bugzilla->user->login || 'an anonymous user', "\n";
}
sub
webservice_fix_credentials
{
my
(
$self
,
$args
)
=
@_
;
my
$rpc
=
$args
->
{
'rpc'
};
...
...
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