def is_active_staff_or_superuser(request):
    """
    Standalone mode authorization check
    """
    return request.user and request.user.is_active and (request.user.
        is_staff or request.user.is_superuser)
