diff options
author | Simon Green <sgreen@redhat.com> | 2014-06-13 02:42:35 +0200 |
---|---|---|
committer | Simon Green <sgreen@redhat.com> | 2014-06-13 02:42:35 +0200 |
commit | 6c6efdde5b5e041deb75f65b5a18baae7665d660 (patch) | |
tree | 4a10374b0c02019d8518ecedacd251fbefb32374 /extensions | |
parent | eb13c383198a1c52a7858fdf3fee0248262bbaf0 (diff) | |
download | bugzilla-6c6efdde5b5e041deb75f65b5a18baae7665d660.tar.gz bugzilla-6c6efdde5b5e041deb75f65b5a18baae7665d660.tar.xz |
Bug 1023633 - Add a webservice_before_call Hook
r=dkl, a=glob
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/Example/Extension.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/extensions/Example/Extension.pm b/extensions/Example/Extension.pm index 5370b0f4c..22a3103c2 100644 --- a/extensions/Example/Extension.pm +++ b/extensions/Example/Extension.pm @@ -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'}; |