private String checkPermissions() {
        if (!securityContext.hasAppPermission(AppPermission.VIEW_DATA_PERMISSION)) {
            if (!securityContext.hasAppPermission(AppPermission.VIEW_DATA_WITH_PIPELINE_PERMISSION)) {
                return "You do not have permission to display this item";
            } else if (getTextSettings().getPipeline() == null) {
                return "You must choose a pipeline to display this item";
            }
        }

        return null;
    }
The ranges returned are line/col positions in the input text. Thus the input text should
not be changed/formatted after the highlight ranges have been generated.
stroom-core-client/src/main/java/stroom/dashboard/client/text/TextPresenter.java