Closed Bug 1023633 Opened 7 years ago Closed 7 years ago

Add a webservice_before_call Hook

Categories

(Bugzilla :: Extensions, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: mail, Assigned: mail)

Details

Attachments

(1 file)

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).
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+
Severity: normal → enhancement
Component: WebService → Extensions
Flags: approval?
Target Milestone: --- → Bugzilla 5.0
Flags: approval? → approval+
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   eb13c38..6c6efdd  master -> master
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.