Add an is_enabled_for mechanism for NavigationBarHook.
Review Request #6390 — Created Oct. 1, 2014 and submitted
This adds a way for
NavigationBarHooks to be enabled/disabled per-user. This is
done by adding a new, optionalis_enabled_forflag to the constructor, which is
a callable that returns either True or False.
- Ran unit tests.
- Used this in an extension.
- Commit:
-
9bcf0a0f27e94fcd91186f95a173884d4013c7a9a2f17479eef33939b6d5ef576621aa221d689e04
- Diff:
-
Revision 2 (+12 -2)
Tool: PEP8 Style Checker Processed Files: reviewboard/extensions/hooks.py Tool: Pyflakes Processed Files: reviewboard/extensions/hooks.py