Add an is_enabled_for mechanism for NavigationBarHook.

Review Request #6390 — Created Oct. 1, 2014 and submitted

Information

Review Board
release-2.0.x
a2f1747...

Reviewers

This adds a way for NavigationBarHooks to be enabled/disabled per-user. This is
done by adding a new, optional is_enabled_for flag to the constructor, which is
a callable that returns either True or False.

  • Ran unit tests.
  • Used this in an extension.
Description From Last Updated

Why isn't this just in the argument list?

chipx86chipx86

This should probably go in the docstring.

chipx86chipx86
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/extensions/hooks.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/extensions/hooks.py
    
    
  2. 
      
chipx86
  1. 
      
  2. reviewboard/extensions/hooks.py (Diff revision 1)
     
     
     
     
     
     
    Show all issues

    Why isn't this just in the argument list?

    1. I don't even know.

  3. 
      
david
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/extensions/hooks.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/extensions/hooks.py
    
    
  2. 
      
chipx86
  1. 
      
  2. reviewboard/extensions/hooks.py (Diff revision 2)
     
     
     
     
    Show all issues

    This should probably go in the docstring.

  3. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (e3de9ec)