diff --git a/ee/app/controllers/ee/ldap/omniauth_callbacks_controller.rb b/ee/app/controllers/ee/ldap/omniauth_callbacks_controller.rb deleted file mode 100644 index f1e851a210b..00000000000 --- a/ee/app/controllers/ee/ldap/omniauth_callbacks_controller.rb +++ /dev/null @@ -1,22 +0,0 @@ -module EE - module Ldap - module OmniauthCallbacksController - extend ::Gitlab::Utils::Override - - override :sign_in_and_redirect - def sign_in_and_redirect(user) - # The counter gets incremented in `sign_in_and_redirect` - show_ldap_sync_flash if user.sign_in_count == 0 - - super - end - - private - - 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 -end diff --git a/ee/spec/controllers/ldap/omniauth_callbacks_controller_spec.rb b/ee/spec/controllers/ldap/omniauth_callbacks_controller_spec.rb deleted file mode 100644 index 0835ff35846..00000000000 --- a/ee/spec/controllers/ldap/omniauth_callbacks_controller_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'spec_helper' - -describe Ldap::OmniauthCallbacksController do - include_context 'Ldap::OmniauthCallbacksController' - - it "displays LDAP sync flash on first sign in" do - post provider - - expect(flash[:notice]).to match(/LDAP sync in progress*/) - end - - it "skips LDAP sync flash on subsequent sign ins" do - user.update!(sign_in_count: 1) - - post provider - - expect(flash[:notice]).to eq nil - end - - context 'access denied' do - let(:valid_login?) { false } - - it 'logs a failure event' do - stub_licensed_features(extended_audit_events: true) - - expect { post provider }.to change(SecurityEvent, :count).by(1) - end - end -end