Abort the current request with a 403 (Forbidden) response code. If the
    message is given it's output as an error message in the response body
    (correctly converted to the requested MIME type).

    :param instance: Resource instance (used to access the response)
    :type instance: :class:`webob.resource.Resource`
    :raises: :class:`webob.exceptions.ResponseException` of status 403

def raise_403(instance, msg=None):
    """Abort the current request with a 403 (Forbidden) response code. If the
    message is given it's output as an error message in the response body
    (correctly converted to the requested MIME type).

    :param instance: Resource instance (used to access the response)
    :type instance: :class:`webob.resource.Resource`
    :raises: :class:`webob.exceptions.ResponseException` of status 403
    """
    instance.response.status = 403
    if msg:
        instance.response.body_raw = {'error': msg}
    raise ResponseException(instance.response)