From 9d30eded7551522daaae44f1728e299264d40e38 Mon Sep 17 00:00:00 2001 From: Simon Green Date: Thu, 12 Jun 2014 12:39:42 +0800 Subject: Bug 1023633: Add a webservice_before_call Hook --- extensions/Example/Extension.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'extensions/Example') 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'}; -- cgit v1.2.3-24-g4f1b