File tree Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ def after_sign_in_path_for(resource)
55 stored_location = stored_location_for ( resource )
66 if stored_location
77 stored_location
8- elsif current_user . admin? || current_user . admin_limited_access?
9- manage_root_path
108 elsif current_user . questionnaire . nil?
119 new_questionnaires_path
1210 else
Original file line number Diff line number Diff line change 33 %h1 .section-title.center
44 Sign in to
55 %span .emphasized = HackathonConfig['name']
6- - if notice
7- .form-success
8- .success_message
9- %p #notice = notice
106 = render 'form'
Original file line number Diff line number Diff line change 99
1010 mount MailPreview => "mail_view" if Rails . env . development?
1111
12- root to : "questionnaires#show"
12+ devise_scope :user do
13+ authenticated do
14+ root to : "questionnaires#show"
15+ end
16+
17+ unauthenticated do
18+ root to : "devise/sessions#new"
19+ end
20+ end
1321
1422 authenticate :user , -> ( u ) { u . admin? } do
1523 mount Sidekiq ::Web => "/sidekiq"
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class UserFlowsTest < ActionDispatch::IntegrationTest
1212
1313 should "be able to login and browse site as an admin" do
1414 login ( FactoryBot . create ( :admin ) )
15- assert_redirected_to manage_root_path
15+ assert_redirected_to new_questionnaires_path
1616
1717 get manage_dashboard_index_path
1818 assert_response :success
You can’t perform that action at this time.
0 commit comments