mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Add more auth methods
This commit is contained in:
parent
d1ec91323b
commit
6352c23cf1
2 changed files with 5 additions and 0 deletions
|
@ -5,6 +5,7 @@ class Epp::DomainsController < EppController
|
|||
before_action :find_password, only: [:info]
|
||||
|
||||
def create
|
||||
authorize! :create, Epp::EppDomain
|
||||
@domain = Epp::EppDomain.new_from_epp(params[:parsed_frame], current_user)
|
||||
|
||||
if @domain.errors.any? || !@domain.save
|
||||
|
@ -20,6 +21,8 @@ class Epp::DomainsController < EppController
|
|||
end
|
||||
|
||||
def check
|
||||
authorize! :check, Epp::EppDomain
|
||||
|
||||
names = params[:parsed_frame].css('name').map(&:text)
|
||||
@domains = Epp::EppDomain.check_availability(names)
|
||||
render_epp_response '/epp/domains/check'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue