diff options
author | jnoortheen <jnoortheen@gmail.com> | 2016-11-29 22:01:01 +0530 |
---|---|---|
committer | jnoortheen <jnoortheen@gmail.com> | 2016-12-07 20:30:28 +0530 |
commit | 6ab74b1cb3f6982c52c7124a6e9e451c83d33645 (patch) | |
tree | dd273ee924c318ea75b8015ddb5e4eaacd2b1a23 | |
parent | e09c6df0682c499e221a0da41ac263482fbcf568 (diff) | |
download | gitlab-ce-6ab74b1cb3f6982c52c7124a6e9e451c83d33645.tar.gz |
fix: 24982- Remove'Signed in successfully' message
After this change the sign-in-success flash message will not be shown
refactor: set flash message to be nil while signing in
test: changed tests to reflect removal of sign-in message
refactor: adding signed_in message back
See Merge Request !7837
issue#24982
-rw-r--r-- | app/controllers/sessions_controller.rb | 2 | ||||
-rw-r--r-- | changelogs/unreleased/24982-ux-improvement-sign-in-success-message.yml | 5 | ||||
-rw-r--r-- | spec/controllers/sessions_controller_spec.rb | 1 | ||||
-rw-r--r-- | spec/features/u2f_spec.rb | 9 |
4 files changed, 11 insertions, 6 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 5d7ecfeacf4..38e7c6f4a48 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -31,6 +31,8 @@ class SessionsController < Devise::SessionsController resource.update_attributes(reset_password_token: nil, reset_password_sent_at: nil) end + # hide the signed-in notification + flash[:notice] = nil log_audit_event(current_user, with: authentication_method) end end diff --git a/changelogs/unreleased/24982-ux-improvement-sign-in-success-message.yml b/changelogs/unreleased/24982-ux-improvement-sign-in-success-message.yml new file mode 100644 index 00000000000..12ea08e3815 --- /dev/null +++ b/changelogs/unreleased/24982-ux-improvement-sign-in-success-message.yml @@ -0,0 +1,5 @@ +--- +title: 'fix: 24982- Remove''Signed in successfully'' message After this change the + sign-in-success flash message will not be shown' +merge_request: 7837 +author: jnoortheen diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb index 48d69377461..b56c7880b64 100644 --- a/spec/controllers/sessions_controller_spec.rb +++ b/spec/controllers/sessions_controller_spec.rb @@ -22,7 +22,6 @@ describe SessionsController do it 'authenticates user correctly' do post(:create, user: { login: user.username, password: user.password }) - expect(response).to set_flash.to /Signed in successfully/ expect(subject.current_user). to eq user end diff --git a/spec/features/u2f_spec.rb b/spec/features/u2f_spec.rb index b750f27ea72..be21b403084 100644 --- a/spec/features/u2f_spec.rb +++ b/spec/features/u2f_spec.rb @@ -163,8 +163,7 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', feature: click_on "Sign in via U2F device" expect(page.body).to match('We heard back from your U2F device') click_on "Authenticate via U2F Device" - - expect(page.body).to match('Signed in successfully') + expect(page.body).to match('href="/users/sign_out"') end end @@ -178,7 +177,7 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', feature: expect(page.body).to match('We heard back from your U2F device') click_on "Authenticate via U2F Device" - expect(page.body).to match('Signed in successfully') + expect(page.body).to match('href="/users/sign_out"') end end @@ -234,7 +233,7 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', feature: expect(page.body).to match('We heard back from your U2F device') click_on "Authenticate via U2F Device" - expect(page.body).to match('Signed in successfully') + expect(page.body).to match('href="/users/sign_out"') end end end @@ -275,7 +274,7 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', feature: expect(page.body).to match('We heard back from your U2F device') click_on "Authenticate via U2F Device" - expect(page.body).to match('Signed in successfully') + expect(page.body).to match('href="/users/sign_out"') logout end |