diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-05-10 11:28:27 +0100 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-05-10 11:28:27 +0100 |
commit | 318812ff0e69321c5b02461b505db392368779d4 (patch) | |
tree | 8b94c382a54ee70fb7b0dfbf478d5b983a345dd9 | |
parent | bbc53f2b86f6bc3453e1dc29cc56c2792cee9f49 (diff) | |
download | gitlab-ce-jej/fix-accidental-ee-directory.tar.gz |
Remove accidental EE additions in CEjej/fix-accidental-ee-directory
-rw-r--r-- | ee/app/controllers/ee/ldap/omniauth_callbacks_controller.rb | 22 | ||||
-rw-r--r-- | ee/spec/controllers/ldap/omniauth_callbacks_controller_spec.rb | 29 |
2 files changed, 0 insertions, 51 deletions
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 |