mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 10:45:58 +02:00
Add IP block on authentication via EID
Also, correct mistakenly used 403 error code. Update aplication-example.yml to include new functionality.
This commit is contained in:
parent
8f234a5852
commit
42004f933f
6 changed files with 42 additions and 6 deletions
|
@ -7,11 +7,11 @@ module Api
|
|||
class DomainsController < BaseController
|
||||
def index
|
||||
registrant = ::Registrant.find_by(ident: current_user.registrant_ident)
|
||||
unless registrant
|
||||
render json: Domain.all
|
||||
else
|
||||
if registrant
|
||||
domains = Domain.where(registrant_id: registrant.id)
|
||||
render json: domains
|
||||
else
|
||||
render json: []
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue