diff --git a/app/controllers/dois_controller.rb b/app/controllers/dois_controller.rb index d61946eef..d739b08bf 100644 --- a/app/controllers/dois_controller.rb +++ b/app/controllers/dois_controller.rb @@ -397,7 +397,7 @@ def random def get_url authorize! :get_url, @doi - if !@doi.is_registered_or_findable? || %w(europ crossref medra).include?(@doi.provider_id) || %w(Crossref mEDRA).include?(@doi.agency) + if !@doi.is_registered_or_findable? || %w(europ crossref medra jalc kisti op).include?(@doi.provider_id) || %w(Crossref mEDRA).include?(@doi.agency) url = @doi.url head :no_content and return unless url.present? else diff --git a/app/models/concerns/crosscitable.rb b/app/models/concerns/crosscitable.rb index 724dcf565..edc8074f7 100644 --- a/app/models/concerns/crosscitable.rb +++ b/app/models/concerns/crosscitable.rb @@ -9,6 +9,15 @@ module Crosscitable attr_accessor :issue, :volume, :style, :locale + alias_attribute :get_medra, :get_crossref + alias_attribute :read_medra, :read_crossref + alias_attribute :get_kisti, :get_crossref + alias_attribute :read_kisti, :read_crossref + alias_attribute :get_jalc, :get_crossref + alias_attribute :read_jalc, :read_crossref + alias_attribute :get_op, :get_crossref + alias_attribute :read_op, :read_crossref + def sandbox !Rails.env.production? end