aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/welcome_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/welcome_controller.rb')
-rw-r--r--app/controllers/welcome_controller.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb
index 85246e5..5fce0cf 100644
--- a/app/controllers/welcome_controller.rb
+++ b/app/controllers/welcome_controller.rb
@@ -121,16 +121,15 @@ class WelcomeController < ApplicationController
# Update user agents
def perform_background_jobs
if @current_user.present?
- AgencyWatcherJob.perform_later(@current_user, @sso.user_info[:groups].split(','))
+ EnsureAgentJob.perform_later(@current_user, @sso.user_info[:groups].split(','))
end
end
# Save User ID and current agent in session
def update_current_session
if @current_user.present?
- session[:current_user] = @current_user[:external_id]
- # TODO: make this a bit smarter
- session[:current_agent] = @current_user&.agents&.pluck(:name)&.last
+ session[:current_user] = @current_user[:external_id]
+ session[:current_agent] = current_agent_name
end
end
end