mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Merge branch '105842700-registrants_portal' into staging
* 105842700-registrants_portal: 105842700-related_commit_for_113525877
This commit is contained in:
commit
e60a6ae647
8 changed files with 40 additions and 4 deletions
|
@ -19,6 +19,22 @@ class Registrant::DomainsController < RegistrantController
|
|||
@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)) &&
|
||||
dom.pending_json.present?
|
||||
|
||||
@domain = dom
|
||||
confirm_path = "#{ENV['registrant_url']}/registrant/domain_update_confirms"
|
||||
@verification_url = "#{confirm_path}/#{@domain.id}?token=#{@domain.registrant_verification_token}"
|
||||
|
||||
else
|
||||
flash[:warning] = I18n.t('available_verification_url_not_found')
|
||||
redirect_to registrant_domain_path(dom.id)
|
||||
end
|
||||
end
|
||||
|
||||
def download_list
|
||||
authorize! :view, :registrant_domains
|
||||
params[:q] ||= {}
|
||||
|
|
|
@ -2,6 +2,7 @@ class Registrant::RegistrantsController < RegistrantController
|
|||
|
||||
def show
|
||||
@contact = Registrant.find(params[:id])
|
||||
@current_user = current_user
|
||||
authorize! :read, @contact
|
||||
@contact.valid?
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue