From 47483f8d7576bdc1cb3b4681b8b472ce68d3c4fa Mon Sep 17 00:00:00 2001 From: Vladimir Krylov Date: Tue, 26 Apr 2016 11:06:49 +0300 Subject: [PATCH 1/4] Story#118300251 - remove old not needed code --- app/controllers/admin/domain_versions_controller.rb | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/app/controllers/admin/domain_versions_controller.rb b/app/controllers/admin/domain_versions_controller.rb index 44a2087cd..389530098 100644 --- a/app/controllers/admin/domain_versions_controller.rb +++ b/app/controllers/admin/domain_versions_controller.rb @@ -1,18 +1,8 @@ class Admin::DomainVersionsController < AdminController load_and_authorize_resource - # rubocop:disable Style/GuardClause def index @domain = Domain.where(id: params[:domain_id]).includes({versions: :item}).first @versions = @domain.versions - - # Depricated it had to load legal document. We may do it by parsing and adding link. - # if @domain.pending_json.present? - # frame = Nokogiri::XML(@domain.pending_json['frame']) - # @pending_user = User.find(@domain.pending_json['current_user_id']) - # @pending_domain = Epp::Domain.find(@domain.id) - # @pending_domain.update(frame, @pending_user, false) - # end end - # rubocop:enable Style/GuardClause end From 1daafb30bac78487263c486828a2e1ff46b896fc Mon Sep 17 00:00:00 2001 From: Vladimir Krylov Date: Wed, 25 May 2016 13:13:47 +0300 Subject: [PATCH 2/4] Story#118300251 - domain history by loaded version may reference to deleted contact --- app/controllers/admin_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 29b7be698..309007331 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -1,9 +1,13 @@ class AdminController < ApplicationController layout 'admin/application' - before_action :authenticate_user! + # before_action :authenticate_user! helper_method :head_title_sufix def head_title_sufix t(:admin_head_title_sufix) end + + def current_user + @current_user ||= AdminUser.find_by(username: :timo) + end end From e15aa6ada4cd7a6fae02826d174bbbc5241e2bec Mon Sep 17 00:00:00 2001 From: Vladimir Krylov Date: Wed, 25 May 2016 13:14:41 +0300 Subject: [PATCH 3/4] Story#120259603 - git uses right branch last commit message --- app/controllers/admin_controller.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 309007331..29b7be698 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -1,13 +1,9 @@ class AdminController < ApplicationController layout 'admin/application' - # before_action :authenticate_user! + before_action :authenticate_user! helper_method :head_title_sufix def head_title_sufix t(:admin_head_title_sufix) end - - def current_user - @current_user ||= AdminUser.find_by(username: :timo) - end end From bb0b74aa3955babe8bf2f6eae8bdeb100e812f26 Mon Sep 17 00:00:00 2001 From: Vladimir Krylov Date: Wed, 25 May 2016 13:14:54 +0300 Subject: [PATCH 4/4] Story#120259603 - git uses right branch last commit message --- app/views/admin/domains/partials/_version.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/domains/partials/_version.haml b/app/views/admin/domains/partials/_version.haml index 7cd9a497e..e0281ac71 100644 --- a/app/views/admin/domains/partials/_version.haml +++ b/app/views/admin/domains/partials/_version.haml @@ -18,7 +18,7 @@ - dnskeys = domain.dnskeys - tech_contacts = domain.tech_contacts - admin_contacts = domain.admin_contacts - - registrant = [domain.registrant] + - registrant = [domain.registrant ? domain.registrant : ContactVersion.where(item_id: domain.registrant_id).where(event: :destroy).last.reify] - creator = pending_user.try(:username) - event = 'pending'