Sha256: 41b350e3fd56d15f10fa485c9049213cada515202a7bf7a793bf3d67dd02f91f

Contents?: true

Size: 469 Bytes

Versions: 10

Compression:

Stored size: 469 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(:dct_provenance_s, '').casecmp(Settings.INSTITUTION_LOCAL_NAME).zero?
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
geoblacklight_sidecar_images-0.8.0 app/models/concerns/wms_rewrite_concern.rb
geoblacklight_sidecar_images-0.7.0 app/models/concerns/wms_rewrite_concern.rb
geoblacklight_sidecar_images-0.6.5 app/models/concerns/wms_rewrite_concern.rb
geoblacklight_sidecar_images-0.6.4 app/models/concerns/wms_rewrite_concern.rb
geoblacklight_sidecar_images-0.6.2 app/models/concerns/wms_rewrite_concern.rb
geoblacklight_sidecar_images-0.6.1 app/models/concerns/wms_rewrite_concern.rb
geoblacklight_sidecar_images-0.6.0 app/models/concerns/wms_rewrite_concern.rb
geoblacklight_sidecar_images-0.5.1 lib/generators/geoblacklight_sidecar_images/templates/models/concerns/wms_rewrite_concern.rb
geoblacklight_sidecar_images-0.5.0 lib/generators/geoblacklight_sidecar_images/templates/models/concerns/wms_rewrite_concern.rb
geoblacklight_sidecar_images-0.1.0 lib/generators/geoblacklight_sidecar_images/templates/models/concerns/wms_rewrite_concern.rb