Commit d0d27531 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'mrchrisw-remove-ldap-sync-msg' into 'master'

Only show LDAP sync in progress flash banner on first login

See merge request !2322
parents ac030f24 2012c3cc
...@@ -35,8 +35,8 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController ...@@ -35,8 +35,8 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
prompt_for_two_factor(@user) prompt_for_two_factor(@user)
else else
log_audit_event(@user, with: :ldap) log_audit_event(@user, with: :ldap)
flash[:notice] = 'LDAP sync in progress. This could take a few minutes. '\ # The counter only gets incremented in `sign_in_and_redirect`
'Refresh the page to see the changes.' show_ldap_sync_flash if @user.sign_in_count == 0
sign_in_and_redirect(@user) sign_in_and_redirect(@user)
end end
else else
...@@ -168,4 +168,9 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController ...@@ -168,4 +168,9 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
request_params = request.env['omniauth.params'] request_params = request.env['omniauth.params']
(request_params['remember_me'] == '1') if request_params.present? (request_params['remember_me'] == '1') if request_params.present?
end end
def show_ldap_sync_flash
flash[:notice] = 'LDAP sync in progress. This could take a few minutes. '\
'Refresh the page to see the changes.'
end
end end
---
title: Only show the LDAP sync banner on first login
merge_request:
author:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment