Beispiel #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)
Beispiel #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)
Beispiel #3
0
 def __call__(self, request):
     return require_privilege(BLOG_ADMIN)(self.configure)(request)
Beispiel #4
0
 def __call__(self, request):
     return require_privilege(BLOG_ADMIN)(self.configure)(request)