Sha256: 7fab1368aa512d5ed5729c08dcc865a871ad5dfb5bdd4eecfd79751c2dbc74c9

Contents?: true

Size: 476 Bytes

Versions: 1

Compression:

Stored size: 476 Bytes

Contents

# frozen_string_literal: true

module WmsRewriteConcern
  extend Geoblacklight::SolrDocument

  def viewer_endpoint
    if local_restricted?
      # replace wms prefix with cas authed proxy
      super.gsub(Settings.INSTITUTION_GEOSERVER_URL, Settings.PROXY_GEOSERVER_URL)
    else
      super
    end
  end

  def local_restricted?
    local? && restricted?
  end

  def local?
    fetch(Settings.FIELDS.PROVIDER, "").casecmp(Settings.INSTITUTION_LOCAL_NAME).zero?
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
geoblacklight_sidecar_images-1.0.0 app/models/concerns/wms_rewrite_concern.rb