Exemple #1
0
def can_moderate(article, user):
    return not user.is_anonymous() and settings.CAN_MODERATE(article, user)
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')
Exemple #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')