Remove flash warning from login page
This commit is contained in:
parent
adc0e41f2b
commit
685d67cc3f
3 changed files with 11 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
|||
# For users who haven't customized the setting, we simply delegate to
|
||||
# `DashboardController#show`, which is the default.
|
||||
class RootController < Dashboard::ProjectsController
|
||||
skip_before_action :authenticate_user!, only: [:index]
|
||||
before_action :redirect_to_custom_dashboard, only: [:index]
|
||||
|
||||
def index
|
||||
|
@ -16,7 +17,7 @@ class RootController < Dashboard::ProjectsController
|
|||
private
|
||||
|
||||
def redirect_to_custom_dashboard
|
||||
return unless current_user
|
||||
return redirect_to new_user_session_path unless current_user
|
||||
|
||||
case current_user.dashboard
|
||||
when 'stars'
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Remove flash warning from login page
|
||||
merge_request: 8864
|
||||
author: Gerald J. Padilla
|
|
@ -25,6 +25,11 @@ feature 'Login', feature: true do
|
|||
|
||||
expect(current_path).to eq root_path
|
||||
end
|
||||
|
||||
it 'does not show flash messages when login page' do
|
||||
visit root_path
|
||||
expect(page).not_to have_content('You need to sign in or sign up before continuing.')
|
||||
end
|
||||
end
|
||||
|
||||
describe 'with two-factor authentication' do
|
||||
|
|
Loading…
Reference in a new issue