Part of lp.services.webapp View In Hierarchy
Function decorator that disables the output link unless the current user has the given permission on the context. This class is instantiated by programmers who want to apply this decorator. Use it like: @enabled_with_permission('launchpad.Admin') def somemenuitem(self): return Link('+target', 'link text')
Method | __init__ | Make a new enabled_with_permission function decorator. |
Method | __call__ | Called by the decorator machinery to return a decorated function. |