Merge branch 'master' into registry-790

This commit is contained in:
Artur Beljajev 2018-08-27 15:24:05 +03:00
commit 3d51a93f95
104 changed files with 728 additions and 557 deletions

View file

@ -1,18 +0,0 @@
class DeviseCustomFailure < Devise::FailureApp
def redirect_url
return registrant_login_url if request.original_fullpath.to_s.match(%r{^\/registrant})
return registrar_login_url if request.original_fullpath.to_s.match(%r{^\/registrar})
return '/admin' if request.original_fullpath.to_s.match(%r{^\/admin\/que})
return admin_login_url if request.original_fullpath.to_s.match(%r{^\/admin})
root_url
end
# You need to override respond to eliminate recall
def respond
if http_auth?
http_auth
else
redirect
end
end
end

View file

@ -145,7 +145,7 @@ namespace :import do
if y.try(:cert) == 'idkaart'
id_users << ApiUser.new({
username: y.try(:password) ? y.try(:password) : y.try(:password),
password: ('a'..'z').to_a.shuffle.first(8).join,
plain_text_password: ('a'..'z').to_a.shuffle.first(8).join,
identity_code: y.try(:password) ? y.try(:password) : y.try(:password),
registrar_id: Registrar.find_by(legacy_id: x.try(:id)).try(:id),
roles: ['billing'],
@ -154,7 +154,7 @@ namespace :import do
else
temp << ApiUser.new({
username: x.handle.try(:strip),
password: y.try(:password) ? y.try(:password) : ('a'..'z').to_a.shuffle.first(8).join,
plain_text_password: y.try(:password) ? y.try(:password) : ('a'..'z').to_a.shuffle.first(8).join,
registrar_id: Registrar.find_by(legacy_id: x.try(:id)).try(:id),
roles: ['epp'],
legacy_id: y.try(:id)