mirror of
https://github.com/internetee/registry.git
synced 2025-05-29 09:00:02 +02:00
Merge pull request #127 from internetee/115595167-records_match
115595167 records match
This commit is contained in:
commit
572a3f4e1d
5 changed files with 33 additions and 3 deletions
|
@ -49,7 +49,8 @@ module Repp
|
|||
response_code: status,
|
||||
api_user_name: current_user.try(:username),
|
||||
api_user_registrar: current_user.try(:registrar).try(:to_s),
|
||||
ip: request.ip
|
||||
ip: request.ip,
|
||||
uuid: request.uuid
|
||||
})
|
||||
end
|
||||
|
||||
|
|
|
@ -55,6 +55,10 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
end
|
||||
|
||||
def info_for_paper_trail
|
||||
{ uuid: request.uuid }
|
||||
end
|
||||
|
||||
def user_for_paper_trail
|
||||
user_log_str(current_user)
|
||||
end
|
||||
|
|
|
@ -361,7 +361,7 @@ class EppController < ApplicationController
|
|||
if request_command == 'login' && frame.present?
|
||||
frame.gsub!(/pw>.+<\//, 'pw>[FILTERED]</')
|
||||
end
|
||||
trimmed_request = frame.gsub(/<eis:legalDocument([^>]+)>([^<])+<\/eis:legalDocument>/, "<eis:legalDocument>[FILTERED]</eis:legalDocument>")
|
||||
trimmed_request = frame.gsub(/<eis:legalDocument([^>]+)>([^<])+<\/eis:legalDocument>/, "<eis:legalDocument>[FILTERED]</eis:legalDocument>") if frame.present?
|
||||
|
||||
ApiLog::EppLog.create({
|
||||
request: trimmed_request,
|
||||
|
@ -371,7 +371,8 @@ class EppController < ApplicationController
|
|||
response: @response,
|
||||
api_user_name: @api_user.try(:username) || current_user.try(:username) || 'api-public',
|
||||
api_user_registrar: @api_user.try(:registrar).try(:to_s) || current_user.try(:registrar).try(:to_s),
|
||||
ip: request.ip
|
||||
ip: request.ip,
|
||||
uuid: request.uuid
|
||||
})
|
||||
end
|
||||
# rubocop: enable Metrics/CyclomaticComplexity
|
||||
|
|
15
db/migrate/20160411140719_add_matching_column.rb
Normal file
15
db/migrate/20160411140719_add_matching_column.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
class AddMatchingColumn < ActiveRecord::Migration
|
||||
|
||||
def change
|
||||
tables = [:log_account_activities, :log_accounts, :log_addresses, :log_api_users, :log_bank_statements,
|
||||
:log_bank_transactions, :log_blocked_domains, :log_certificates, :log_contact_statuses, :log_contacts,
|
||||
:log_countries, :log_dnskeys, :log_domain_contacts, :log_domain_statuses, :log_domain_transfers,
|
||||
:log_domains, :log_invoice_items, :log_invoices, :log_keyrelays, :log_messages, :log_nameservers,
|
||||
:log_pricelists, :log_registrars, :log_reserved_domains, :log_settings, :log_users, :log_white_ips,
|
||||
:log_zonefile_settings]
|
||||
|
||||
tables.each do |table|
|
||||
add_column table, :uuid, :string
|
||||
end
|
||||
end
|
||||
end
|
9
db/migrate/20160421074023_add_log_matching_column.rb
Normal file
9
db/migrate/20160421074023_add_log_matching_column.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
class AddLogMatchingColumn < ActiveRecord::Migration
|
||||
|
||||
def change
|
||||
|
||||
ApiLog::EppLog.connection.execute("ALTER TABLE epp_logs ADD COLUMN uuid varchar;")
|
||||
ApiLog::ReppLog.connection.execute("ALTER TABLE repp_logs ADD COLUMN uuid varchar;")
|
||||
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue