def login_maybe_required(viewfunc):
    if settings.ALLOW_ANONYMOUS_ACCESS:
        return viewfunc
    return login_required(viewfunc)
no-op if settings.ALLOW_ANONYMOUS_ACCESS, else login_required
dataset/ETHPy150Open mozilla/moztrap/moztrap/view/utils/auth.py/login_maybe_required