mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
Merge branch 'master' into registry-790
This commit is contained in:
commit
e4305e7865
86 changed files with 1329 additions and 1163 deletions
|
@ -1,12 +1,15 @@
|
|||
class Registrant::ContactsController < RegistrantController
|
||||
helper_method :domain_ids
|
||||
|
||||
def show
|
||||
@contact = Contact.where(id: contacts).find_by(id: params[:id])
|
||||
@contact = Contact.where(id: contacts).find_by(id: params[:id])
|
||||
@current_user = current_user
|
||||
|
||||
authorize! :read, @contact
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def contacts
|
||||
begin
|
||||
DomainContact.where(domain_id: domain_ids).pluck(:contact_id) | Domain.where(id: domain_ids).pluck(:registrant_id)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class Registrant::DomainUpdateConfirmsController < RegistrantController
|
||||
skip_before_action :authenticate_user!, only: [:show, :update]
|
||||
skip_authorization_check only: [:show, :update]
|
||||
skip_before_action :authenticate_user!, only: %i[show update]
|
||||
skip_authorization_check only: %i[show update]
|
||||
|
||||
def show
|
||||
return if params[:confirmed] || params[:rejected]
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
class Registrant::RegistrarsController < RegistrantController
|
||||
|
||||
def show
|
||||
@registrar = Registrar.find(params[:id])
|
||||
authorize! :read, @registrar
|
||||
end
|
||||
end
|
||||
end
|
|
@ -44,7 +44,10 @@ class Registrar
|
|||
parsed_response = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
if response.code == '200'
|
||||
flash[:notice] = t '.replaced'
|
||||
notices = [t('.replaced')]
|
||||
notices << "#{t('.affected_domains')}: #{parsed_response[:affected_domains].join(', ')}"
|
||||
|
||||
flash[:notice] = notices
|
||||
redirect_to registrar_domains_url
|
||||
else
|
||||
@api_errors = parsed_response[:errors]
|
||||
|
|
|
@ -91,7 +91,7 @@ class Registrar
|
|||
@user = find_user_by_idc_and_allowed(response.user_id_code)
|
||||
else
|
||||
@user = find_user_by_idc(response.user_id_code)
|
||||
end
|
||||
end
|
||||
|
||||
if @user.persisted?
|
||||
session[:user_id_code] = response.user_id_code
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue