def METHOD_NAME(self, request, format=None):
    if not request.user.admin_permissions.other_permission():
        return api_error(status.HTTP_403_FORBIDDEN, 'Permission denied.')
    ip_list = [ip.to_dict() for ip in TrustedIP.objects.all()]
    ip_list = sorted(ip_list, key=cmp_to_key(cmp_ip))
    return Response(ip_list)