diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 000000000..a7cd52260 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1623134418422 + + + + + + + + + \ No newline at end of file diff --git a/app/controllers/api/v1/registrant/registry_locks_controller.rb b/app/controllers/api/v1/registrant/registry_locks_controller.rb index a8f420ae5..a97d1c62b 100644 --- a/app/controllers/api/v1/registrant/registry_locks_controller.rb +++ b/app/controllers/api/v1/registrant/registry_locks_controller.rb @@ -8,6 +8,8 @@ module Api before_action :authorized_to_manage_locks? def create + p "============" + if @domain.apply_registry_lock render json: serialized_domain(@domain) else diff --git a/app/models/concerns/domain/registry_lockable.rb b/app/models/concerns/domain/registry_lockable.rb index 240694d8e..7ee9860a8 100644 --- a/app/models/concerns/domain/registry_lockable.rb +++ b/app/models/concerns/domain/registry_lockable.rb @@ -12,7 +12,6 @@ module Domain::RegistryLockable end def apply_registry_lock - # binding.pry return unless registry_lockable? return if locked_by_registrant? diff --git a/app/models/registrant_user.rb b/app/models/registrant_user.rb index f7e85c5af..c6d80901e 100644 --- a/app/models/registrant_user.rb +++ b/app/models/registrant_user.rb @@ -17,11 +17,11 @@ class RegistrantUser < User Country.new(alpha2_code) end - def companies(company_register = CompanyRegister::Client.new) + def companies(company_register = nil) return [] if ident.include?('-') - company_register.representation_rights(citizen_personal_code: ident, - citizen_country_code: country.alpha3) + [OpenStruct.new(registration_number: '43344412', company_name: 'TestFirma'), + OpenStruct.new(registration_number: '12345678', company_name: 'SuperFirma OU')] end def contacts(representable: true)