mirror of
https://github.com/internetee/registry.git
synced 2025-07-02 09:13:36 +02:00
Version refactored
This commit is contained in:
parent
c1949e7069
commit
3e2be53853
48 changed files with 379 additions and 147 deletions
|
@ -22,7 +22,14 @@ class EppController < ApplicationController
|
|||
end
|
||||
|
||||
def current_api_user
|
||||
@current_api_user ||= ApiUser.find(epp_session[:api_user_id]) if epp_session[:api_user_id]
|
||||
return @current_api_user if @current_api_user
|
||||
|
||||
@current_api_user ||= ApiUser.find_by_id(epp_session[:api_user_id])
|
||||
# by default PaperTrail uses before filter and at that
|
||||
# time current_api_user is not yet present
|
||||
::PaperTrail.whodunnit = api_user_log_str(@current_api_user)
|
||||
::PaperSession.session = epp_session.session_id if epp_session.session_id.present?
|
||||
@current_api_user
|
||||
end
|
||||
|
||||
# ERROR + RESPONSE HANDLING
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue