mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 02:39:37 +02:00
Merge branch 'staging' of https://github.com/internetee/registry into staging
This commit is contained in:
commit
51394c795e
5 changed files with 18 additions and 16 deletions
|
@ -67,8 +67,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def user_log_str(user)
|
||||
return 'public' if user.nil?
|
||||
"#{user.id}-#{user.class}: #{user.username}"
|
||||
user.nil? ? 'public' : user.string
|
||||
end
|
||||
|
||||
def comma_support_for(parent_key, key)
|
||||
|
|
|
@ -504,6 +504,7 @@ class Epp::Domain < Domain
|
|||
old_registrant_email = DomainMailer.registrant_updated_notification_for_old_registrant(id, deliver_emails)
|
||||
preclean_pendings
|
||||
user = ApiUser.find(pending_json['current_user_id'])
|
||||
::PaperTrail.whodunnit = user.string # updator str should be the request originator not the approval user
|
||||
frame = Nokogiri::XML(pending_json['frame'])
|
||||
statuses.delete(DomainStatus::PENDING_UPDATE)
|
||||
yield(self) if block_given? # need to skip statuses check here
|
||||
|
|
|
@ -3,4 +3,9 @@ class User < ActiveRecord::Base
|
|||
devise :trackable, :timeoutable
|
||||
|
||||
attr_accessor :phone
|
||||
|
||||
def string
|
||||
"#{self.id}-#{self.class}: #{self.username}"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -46,15 +46,13 @@ xml.epp_head do
|
|||
xml.tag!('contact:email', 'No access')
|
||||
end
|
||||
|
||||
xml.tag!('contact:clID', @contact.registrar.try(:name))
|
||||
if @contact.creator.try(:registrar).blank? && Rails.env.test?
|
||||
xml.tag!('contact:crID', 'TEST-CREATOR')
|
||||
else
|
||||
xml.tag!('contact:crID', @contact.creator.try(:registrar))
|
||||
end
|
||||
xml.tag!('contact:clID', @contact.registrar.try(:code))
|
||||
|
||||
xml.tag!('contact:crID', @contact.creator.registrar.try(:code))
|
||||
xml.tag!('contact:crDate', @contact.created_at.try(:iso8601))
|
||||
|
||||
if @contact.updated_at != @contact.created_at
|
||||
xml.tag!('contact:upID', @contact.updator.try(:registrar))
|
||||
xml.tag!('contact:upID', @contact.updator.registrar.code) if @contact.updator.try(:registrar).present?
|
||||
xml.tag!('contact:upDate', @contact.updated_at.try(:iso8601))
|
||||
end
|
||||
# xml.tag!('contact:trDate', '123') if false
|
||||
|
|
|
@ -36,19 +36,18 @@ xml.epp_head do
|
|||
|
||||
## TODO Find out what this domain:host is all about
|
||||
|
||||
xml.tag!('domain:clID', @domain.registrar_name)
|
||||
|
||||
xml.tag!('domain:crID', @domain.creator.try(:registrar) || @domain.creator) if @domain.creator
|
||||
xml.tag!('domain:clID', @domain.registrar.code)
|
||||
|
||||
xml.tag!('domain:crID', @domain.creator.registrar.code) if @domain.creator
|
||||
xml.tag!('domain:crDate', @domain.created_at.try(:iso8601))
|
||||
|
||||
xml.tag!('domain:upDate', @domain.updated_at.try(:iso8601)) if @domain.updated_at != @domain.created_at
|
||||
if @domain.updated_at != @domain.created_at
|
||||
xml.tag!('domain:upID', @domain.updator.registrar.code) if @domain.updator.try(:registrar).present?
|
||||
xml.tag!('domain:upDate', @domain.updated_at.try(:iso8601))
|
||||
end
|
||||
|
||||
xml.tag!('domain:exDate', @domain.valid_to.try(:iso8601))
|
||||
|
||||
# TODO Make domain stampable
|
||||
#xml.tag!('domain:upID', @domain.updated_by)
|
||||
|
||||
# TODO Make domain transferrable
|
||||
#xml.tag!('domain:trDate', @domain.transferred_at) if @domain.transferred_at
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue