Update upstream source from tag 'upstream/10.8.7+dfsg'
Update to upstream version '10.8.7+dfsg'
with Debian dir a059c0bbb7
This commit is contained in:
commit
bb0212bfb5
2 changed files with 0 additions and 51 deletions
|
@ -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
|
|
|
@ -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
|
|
Loading…
Reference in a new issue