def any_toggle_enabled(*toggles):
    def decorator(view_func):
        @wraps(view_func)
        def wrapped_view(request, *args, **kwargs):
            for t in toggles:
                if (
                    (hasattr(request, 'user') and t.enabled(request.user.username))
                    or (hasattr(request, 'domain') and t.enabled(request.domain))
                ):
                    return view_func(request, *args, **kwargs)
            raise Http404()
        return wrapped_view
    return decorator
Return a view decorator for allowing access if any of the given toggles are
dataset/ETHPy150Open dimagi/commcare-hq/corehq/toggles.py/any_toggle_enabled