Exemplo n.º 1
0
def can_admin(article, user):
    return not user.is_anonymous() and settings.CAN_ADMIN(article, user)
Exemplo n.º 2
0
def can_admin(article, user):
    if callable(settings.CAN_ADMIN):
        return settings.CAN_ADMIN(article, user)
    return not user.is_anonymous() and user.has_perm('wiki.admin')
Exemplo n.º 3
0
def can_admin(article, user):
    if isinstance(settings.CAN_ADMIN, collections.Callable):
        return settings.CAN_ADMIN(article, user)
    return not user.is_anonymous() and user.has_perm('wiki.admin')