mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 09:46:09 +02:00
Merge remote-tracking branch 'origin/master' into 509-directo-to-gem
This commit is contained in:
commit
cd871ca829
45 changed files with 329 additions and 294 deletions
|
@ -1,5 +1,6 @@
|
|||
class ApplicationController < ActionController::Base
|
||||
check_authorization unless: :devise_controller?
|
||||
before_action :set_paper_trail_whodunnit
|
||||
|
||||
# Prevent CSRF attacks by raising an exception.
|
||||
# For APIs, you may want to use :null_session instead.
|
||||
|
@ -32,4 +33,4 @@ class ApplicationController < ActionController::Base
|
|||
def available_languages
|
||||
{ en: 'English', et: 'Estonian' }.invert
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ module Epp
|
|||
before_action :latin_only
|
||||
before_action :validate_against_schema
|
||||
before_action :validate_request
|
||||
before_action :update_epp_session, if: 'signed_in?'
|
||||
before_action :update_epp_session, if: -> { signed_in? }
|
||||
|
||||
around_action :wrap_exceptions
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ module Epp
|
|||
class DomainsController < BaseController
|
||||
before_action :find_domain, only: %i[info renew update transfer delete]
|
||||
before_action :find_password, only: %i[info update transfer delete]
|
||||
before_action :set_paper_trail_whodunnit
|
||||
|
||||
def info
|
||||
authorize! :info, @domain
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
module Epp
|
||||
class SessionsController < BaseController
|
||||
skip_authorization_check only: [:hello, :login, :logout]
|
||||
before_action :set_paper_trail_whodunnit
|
||||
|
||||
def hello
|
||||
render_epp_response('greeting')
|
||||
|
|
|
@ -85,7 +85,7 @@ class Registrar
|
|||
|
||||
def create
|
||||
authorize! :create, Depp::Domain
|
||||
@domain_params = params[:domain]
|
||||
@domain_params = domain_params.to_h
|
||||
@data = @domain.create(@domain_params)
|
||||
|
||||
if response_ok?
|
||||
|
@ -187,5 +187,12 @@ class Registrar
|
|||
:valid_to_lteq,
|
||||
:s)
|
||||
end
|
||||
|
||||
def domain_params
|
||||
params.require(:domain).permit(:name, :period, :registrant, :registrant_helper, :reserved_pw,
|
||||
:legal_document, contacts_attributes: {},
|
||||
nameservers_attributes: {},
|
||||
dnskeys_attributes: {})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue