예제 #1
0
def can_moderate(article, user):
    return not user.is_anonymous() and settings.CAN_MODERATE(article, user)
예제 #2
0
def can_moderate(article, user):
    if callable(settings.CAN_MODERATE):
        return settings.CAN_MODERATE(article, user)
    return not user.is_anonymous() and user.has_perm('wiki.moderate')
예제 #3
0
def can_moderate(article, user):
    if isinstance(settings.CAN_MODERATE, collections.Callable):
        return settings.CAN_MODERATE(article, user)
    return not user.is_anonymous() and user.has_perm('wiki.moderate')