Add a webservice_before_call Hook

RESOLVED FIXED in Bugzilla 5.0

Status

()

Bugzilla
Extensions
--
enhancement
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Simon Green, Assigned: Simon Green)

Tracking

Bugzilla 5.0
Bug Flags:
approval +

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Add a Hook for API calls after logging in. Red Hat use this hook to record usage statistics for RPC calls (who and the method).
(Assignee)

Comment 1

3 years ago
Created attachment 8438072 [details] [diff] [review]
bug1023633-v1.patch
Attachment #8438072 - Flags: review?(dkl)
Comment on attachment 8438072 [details] [diff] [review]
bug1023633-v1.patch

Review of attachment 8438072 [details] [diff] [review]:
-----------------------------------------------------------------

r=dkl

::: extensions/Example/Extension.pm
@@ +958,5 @@
> +    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";

Nit: print "Anonymous" if the user is not logged in when logging the warning (fix on commit)
Attachment #8438072 - Flags: review?(dkl) → review+

Updated

3 years ago
Severity: normal → enhancement
Component: WebService → Extensions
Flags: approval?
Target Milestone: --- → Bugzilla 5.0
Flags: approval? → approval+
(Assignee)

Comment 3

3 years ago
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   eb13c38..6c6efdd  master -> master
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.