mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
Refactor user to admin and api user
This commit is contained in:
parent
f3215680d5
commit
037cb57e00
34 changed files with 551 additions and 551 deletions
|
@ -15,10 +15,10 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def user_for_paper_trail
|
||||
if defined?(current_api_user) && current_api_user.present?
|
||||
# Most of the time it's not loaded in correct time because PaperTrail before filter kicks in
|
||||
# before current_api_user is defined. PaperTrail is triggered also at current_api_user
|
||||
api_user_log_str(current_api_user)
|
||||
if defined?(current_user) && current_user.present?
|
||||
# Most of the time it's not loaded in correct time because PaperTrail before filter kicks in
|
||||
# before current_user is defined. PaperTrail is triggered also at current_user
|
||||
api_user_log_str(current_user)
|
||||
elsif current_user.present?
|
||||
"#{current_user.id}-#{current_user.username}"
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue