summaryrefslogtreecommitdiffstats
path: root/extensions/Example
diff options
context:
space:
mode:
authorSimon Green <sgreen@redhat.com>2014-06-12 06:39:42 +0200
committerByron Jones <glob@mozilla.com>2014-06-12 06:39:42 +0200
commit9d30eded7551522daaae44f1728e299264d40e38 (patch)
tree10b01eafb78a88a2c3292065cf470d42f564b3b2 /extensions/Example
parentf0f5fa2de8cf6ee9e13140051af35b87b8a20239 (diff)
downloadbugzilla-9d30eded7551522daaae44f1728e299264d40e38.tar.gz
bugzilla-9d30eded7551522daaae44f1728e299264d40e38.tar.xz
Bug 1023633: Add a webservice_before_call Hook
Diffstat (limited to 'extensions/Example')
-rw-r--r--extensions/Example/Extension.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/extensions/Example/Extension.pm b/extensions/Example/Extension.pm
index 09e3fc03f..a42f87b9e 100644
--- a/extensions/Example/Extension.pm
+++ b/extensions/Example/Extension.pm
@@ -955,6 +955,19 @@ 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, "\n";
+}
+
sub webservice_fix_credentials {
my ($self, $args) = @_;
my $rpc = $args->{'rpc'};