from django.conf import settings

### used by @user_passes_test decorator on readonly views
def logged_in_or_anon_allowed(user):
    if user.is_authenticated or settings.ALLOW_ANONYMOUS_VIEWING:
        return True
    else:
        return False


f670f6f4c8895c2dd932979f4e0f009776b447a1
<mask token>

<mask token>


def logged_in_or_anon_allowed(user):
    if user.is_authenticated or settings.ALLOW_ANONYMOUS_VIEWING:
        return True
    else:
        return False

from django.conf import settings


def logged_in_or_anon_allowed(user):
    if user.is_authenticated or settings.ALLOW_ANONYMOUS_VIEWING:
        return True
    else:
        return False

from django.conf import settings

### used by @user_passes_test decorator on readonly views
def logged_in_or_anon_allowed(user):
    if user.is_authenticated or settings.ALLOW_ANONYMOUS_VIEWING:
        return True
    else:
        return False

