mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 02:39:37 +02:00
Contact - Registrar relation
This commit is contained in:
parent
9519538744
commit
3d652bf85b
11 changed files with 90 additions and 16 deletions
|
@ -2,6 +2,7 @@ module Epp::ContactsHelper
|
|||
def create_contact
|
||||
@contact = Contact.new(contact_and_address_attributes)
|
||||
@contact.generate_code
|
||||
@contact.registrar = current_epp_user.registrar
|
||||
render '/epp/contacts/create' and return if stamp(@contact) && @contact.save
|
||||
|
||||
handle_errors(@contact)
|
||||
|
@ -113,7 +114,8 @@ module Epp::ContactsHelper
|
|||
|
||||
def owner?
|
||||
return false unless find_contact
|
||||
return true if current_epp_user.registrar == find_contact.created_by.try(:registrar)
|
||||
#return true if current_epp_user.registrar == find_contact.created_by.try(:registrar)
|
||||
return true if @contact.registrar == current_epp_user.registrar
|
||||
epp_errors << { code: '2201', msg: t('errors.messages.epp_authorization_error') }
|
||||
false
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue