mirror of
https://github.com/internetee/registry.git
synced 2025-07-14 06:55:11 +02:00
Add EppSession for custom session management
This commit is contained in:
parent
3a57126e69
commit
e9f23ba348
9 changed files with 92 additions and 2 deletions
|
@ -3,6 +3,7 @@ module Epp::Common
|
|||
|
||||
included do
|
||||
protect_from_forgery with: :null_session
|
||||
helper_method :current_epp_user
|
||||
end
|
||||
|
||||
def proxy
|
||||
|
@ -12,4 +13,12 @@ module Epp::Common
|
|||
def parsed_frame
|
||||
Nokogiri::XML(params[:frame]).remove_namespaces!
|
||||
end
|
||||
|
||||
def epp_session
|
||||
EppSession.find_or_initialize_by(session_id: cookies['session'])
|
||||
end
|
||||
|
||||
def current_epp_user
|
||||
@current_epp_user ||= EppUser.find(epp_session[:epp_user_id]) if epp_session[:epp_user_id]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue