Merge branch 'master' of github.com:domify/registry into registrar-portal

Conflicts:
	.travis.yml
This commit is contained in:
Martin Lensment 2015-03-23 17:12:15 +02:00
commit 57d239ccd1
9 changed files with 84 additions and 41 deletions

View file

@ -28,20 +28,24 @@ module Versions
return nil if creator_str.blank?
if creator_str =~ /^\d-api-/
ApiUser.find_by(id: creator_str)
creator = ApiUser.find_by(id: creator_str)
else
AdminUser.find_by(id: creator_str)
creator = AdminUser.find_by(id: creator_str)
end
creator.present? ? creator : creator_str
end
def updator
return nil if updator_str.blank?
if updator_str =~ /^\d-api-/
ApiUser.find_by(id: updator_str)
updator = ApiUser.find_by(id: updator_str)
else
AdminUser.find_by(id: updator_str)
updator = AdminUser.find_by(id: updator_str)
end
updator.present? ? updator : updator_str
end
# callbacks

View file

@ -116,7 +116,7 @@ class Contact < ActiveRecord::Base
def generate_auth_info
return if @generate_auth_info_disabled
self.auth_info = SecureRandom.hex(16)
self.auth_info = SecureRandom.hex(11)
end
def disable_generate_auth_info! # needed for testing