Handle anonymous user in EPP poll request

Unlike mod_epp, new EPP proxy (https://github.com/internetee/epp_proxy
passes through all valid requests even if a user is not logged in,
therefore we now need to handle such cases on registry app side.

#730
This commit is contained in:
Artur Beljajev 2019-09-03 13:22:52 +03:00 committed by Alex Sherman
parent fde323dd0e
commit 58b8c194bc
2 changed files with 16 additions and 2 deletions

View file

@ -1,8 +1,7 @@
module Epp
class PollsController < BaseController
skip_authorization_check # TODO: move authorization under ability
def poll
authorize! :manage, :poll
req_poll if params[:parsed_frame].css('poll').first['op'] == 'req'
ack_poll if params[:parsed_frame].css('poll').first['op'] == 'ack'
end