Merge branch 'master' into refactor-devise-integration

# Conflicts:
#	app/controllers/registrant/contacts_controller.rb
#	config/routes.rb
This commit is contained in:
Artur Beljajev 2018-07-10 18:09:03 +03:00
commit e5cdb2e8db
79 changed files with 804 additions and 862 deletions

View file

@ -1,11 +1,14 @@
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])
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)

View file

@ -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]

View file

@ -1,7 +1,6 @@
class Registrant::RegistrarsController < RegistrantController
def show
@registrar = Registrar.find(params[:id])
authorize! :read, @registrar
end
end
end