Update WebHookTargetForm to use LocalSiteAwareModelFormMixin.

Review Request #10365 — Created Dec. 27, 2018 and submitted

Information

Review Board
release-3.0.x
6796a91...

Reviewers

This updates WebHookTargetForm to use the new mixin for working with
LocalSites. This allows to be optionally bound to a LocalSite and to
automatically validate against the site.

The form code itself is now a bit simpler, as it doesn't have to perform
its own validation of any specified repositories. It will also allow
future work on the form without worry about injecting incompatible
LocalSite-bound data.

New unit tests have been added for the form, since we didn't have any
before. These largely mirror the tests we have for
LocalSiteAwareModelFormMixin, but with data specific to this form.
This helps to ensure that we don't somehow make the form less secure as
changes are made to the mixin or other code.

Unit tests pass.

chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (137ccde)