Skip to content

Commit

Permalink
Hyrax dois urls should use account cname (#515)
Browse files Browse the repository at this point in the history
* make sure everyone can write to /app/samvera/branding

* assert the host name for polymorphic_url to avoide url mix-ups

* use something more useful to arrive at account cname
  • Loading branch information
cziaarm authored Feb 19, 2024
1 parent 0ae3920 commit e98012c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/hyrax-doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def client

# Override Hyrax::DOI::DataCiteRegister.work_url to ensure that the url registered uses the tenant host
def work_url(work)
account_cname = work["account_cname_tesim"]&.first
account_cname = Account.find_by(tenant: Apartment::Tenant.current)&.cname
Rails.application.routes.url_helpers.polymorphic_url(work, host: account_cname)
end

Expand Down

0 comments on commit e98012c

Please sign in to comment.