There was an error while loading. Please reload this page.
1 parent 0aa549f commit d3b5e15Copy full SHA for d3b5e15
2 files changed
.gitignore
@@ -166,3 +166,4 @@ storage/
166
/config/credentials/stage.yaml.enc
167
/config/credentials/production.key
168
/config/credentials/production.yaml.enc
169
+.nvmrc
app/models/concerns/dmptool/org.rb
@@ -66,6 +66,12 @@ def intercept_from_email_domain(email_domain)
66
matches = ::RegistryOrg.where("home_page LIKE '%www.ucdavis.edu'")
67
return nil if matches.empty? || matches.first.org_id.nil?
68
69
+ ::Org.find_by(id: matches.first.org_id)
70
+
71
+ when /\A(?:.+\.)?mit\.edu\z/
72
+ matches = ::RegistryOrg.where("home_page LIKE '%web.mit.edu'")
73
+ return nil if matches.empty? || matches.first.org_id.nil?
74
75
::Org.find_by(id: matches.first.org_id)
76
else
77
nil
0 commit comments