Skip to content

Commit e98012c

Browse files
authored
Hyrax dois urls should use account cname (#515)
* 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
1 parent 0ae3920 commit e98012c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/initializers/hyrax-doi.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def client
191191

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

0 commit comments

Comments
 (0)