Exemplo n.º 1
0
def require_admin_privilege(expr=None):
    """Works like `require_privilege` but checks if the rule for
    `ENTER_ADMIN_PANEL` exists as well.
    """
    if expr:
        expr = ENTER_ADMIN_PANEL & expr
    else:
        expr = ENTER_ADMIN_PANEL
    return require_privilege(expr)
Exemplo n.º 2
0
def require_admin_privilege(expr=None):
    """Works like `require_privilege` but checks if the rule for
    `ENTER_ADMIN_PANEL` exists as well.
    """
    if expr:
        expr = ENTER_ADMIN_PANEL & expr
    else:
        expr = ENTER_ADMIN_PANEL
    return require_privilege(expr)
Exemplo n.º 3
0
 def __call__(self, request):
     return require_privilege(BLOG_ADMIN)(self.configure)(request)
Exemplo n.º 4
0
 def __call__(self, request):
     return require_privilege(BLOG_ADMIN)(self.configure)(request)