Commit ecc3f315 authored by Sean McGivern's avatar Sean McGivern

Merge branch '24982-ux-improvement-sign-in-success-message' into 'master'

Closes #24982

See merge request !7837
parents 564b1662 6ab74b1c
...@@ -31,6 +31,8 @@ class SessionsController < Devise::SessionsController ...@@ -31,6 +31,8 @@ class SessionsController < Devise::SessionsController
resource.update_attributes(reset_password_token: nil, resource.update_attributes(reset_password_token: nil,
reset_password_sent_at: nil) reset_password_sent_at: nil)
end end
# hide the signed-in notification
flash[:notice] = nil
log_audit_event(current_user, with: authentication_method) log_audit_event(current_user, with: authentication_method)
end end
end end
......
---
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
...@@ -22,7 +22,6 @@ describe SessionsController do ...@@ -22,7 +22,6 @@ describe SessionsController do
it 'authenticates user correctly' do it 'authenticates user correctly' do
post(:create, user: { login: user.username, password: user.password }) 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 expect(subject.current_user). to eq user
end end
......
...@@ -163,8 +163,7 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', feature: ...@@ -163,8 +163,7 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', feature:
click_on "Sign in via U2F device" click_on "Sign in via U2F device"
expect(page.body).to match('We heard back from your U2F device') expect(page.body).to match('We heard back from your U2F device')
click_on "Authenticate via U2F Device" click_on "Authenticate via U2F Device"
expect(page.body).to match('href="/users/sign_out"')
expect(page.body).to match('Signed in successfully')
end end
end end
...@@ -178,7 +177,7 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', feature: ...@@ -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') expect(page.body).to match('We heard back from your U2F device')
click_on "Authenticate via 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 end
...@@ -234,7 +233,7 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', feature: ...@@ -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') expect(page.body).to match('We heard back from your U2F device')
click_on "Authenticate via 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 end
end end
...@@ -275,7 +274,7 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', feature: ...@@ -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') expect(page.body).to match('We heard back from your U2F device')
click_on "Authenticate via 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 logout
end end
......
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