mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
Merge branch 'master' of github.com:domify/registry into registrar-portal
Conflicts: .travis.yml
This commit is contained in:
commit
57d239ccd1
9 changed files with 84 additions and 41 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue