mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Revert "Registry 663"
This commit is contained in:
parent
7ed42b6e82
commit
1690f49575
26 changed files with 165 additions and 308 deletions
|
@ -1,12 +1,13 @@
|
|||
class Registrant::DomainsController < RegistrantController
|
||||
|
||||
def index
|
||||
authorize! :view, :registrant_domains
|
||||
params[:q] ||= {}
|
||||
normalize_search_parameters do
|
||||
@q = domains.search(params[:q])
|
||||
@domains = @q.result.page(params[:page])
|
||||
end
|
||||
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
|
||||
authorize! :view, :registrant_domains
|
||||
params[:q] ||= {}
|
||||
normalize_search_parameters do
|
||||
@q = domains.search(params[:q])
|
||||
@domains = @q.result.page(params[:page])
|
||||
end
|
||||
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
|
||||
end
|
||||
|
||||
def show
|
||||
|
@ -14,15 +15,19 @@ class Registrant::DomainsController < RegistrantController
|
|||
authorize! :read, @domain
|
||||
end
|
||||
|
||||
def set_domain
|
||||
@domain = domains.find(params[:id])
|
||||
end
|
||||
|
||||
def domain_verification_url
|
||||
authorize! :view, :registrant_domains
|
||||
dom = domains.find(params[:id])
|
||||
if (dom.statuses.include?(DomainStatus::PENDING_UPDATE) || dom.statuses.include?(DomainStatus::PENDING_DELETE_CONFIRMATION)) &&
|
||||
dom.pending_json.present?
|
||||
dom.pending_json.present?
|
||||
|
||||
@domain = dom
|
||||
confirm_path = get_confirm_path(dom.statuses)
|
||||
@verification_url = "#{confirm_path}/#{@domain.id}?token=#{@domain.registrant_verification_token}"
|
||||
@domain = dom
|
||||
confirm_path = get_confirm_path(dom.statuses)
|
||||
@verification_url = "#{confirm_path}/#{@domain.id}?token=#{@domain.registrant_verification_token}"
|
||||
|
||||
else
|
||||
flash[:warning] = I18n.t('available_verification_url_not_found')
|
||||
|
@ -47,12 +52,6 @@ class Registrant::DomainsController < RegistrantController
|
|||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_domain
|
||||
@domain = domains.find(params[:id])
|
||||
end
|
||||
|
||||
def domains
|
||||
ident_cc, ident = @current_user.registrant_ident.split '-'
|
||||
begin
|
||||
|
@ -83,4 +82,5 @@ class Registrant::DomainsController < RegistrantController
|
|||
"#{ENV['registrant_url']}/registrant/domain_delete_confirms"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue