Add LocalSite compatibility for NavigationBarHook.is_enabled_for.

Review Request #7626 — Created Sept. 13, 2015 and submitted — Latest diff uploaded

Information

Review Board
release-2.0.x

Reviewers

NavigationBarHook.is_enabled_for only took a user as a parameter, which
meant that the hook couldn't easily differentiate between LocalSites
without subclassing.

Now, is_enabled_for is meant to take keyword arguments, and will be
passed the user, request, and the LocalSite name. Older implementations
that only take a user are still supported, but a warning will be shown.

Unit tests pass.

Used this in an extension that needed to know the LocalSite, and checked
that it worked both with and without the new function signatures.