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)
5
5
stored_location = stored_location_for ( resource )
6
6
if stored_location
7
7
stored_location
8
- elsif current_user . admin? || current_user . admin_limited_access?
9
- manage_root_path
10
8
elsif current_user . questionnaire . nil?
11
9
new_questionnaires_path
12
10
else
Original file line number Diff line number Diff line change 3
3
%h1 .section-title.center
4
4
Sign in to
5
5
%span .emphasized = HackathonConfig['name']
6
- - if notice
7
- .form-success
8
- .success_message
9
- %p #notice = notice
10
6
= render 'form'
Original file line number Diff line number Diff line change 9
9
10
10
mount MailPreview => "mail_view" if Rails . env . development?
11
11
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
13
21
14
22
authenticate :user , -> ( u ) { u . admin? } do
15
23
mount Sidekiq ::Web => "/sidekiq"
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class UserFlowsTest < ActionDispatch::IntegrationTest
12
12
13
13
should "be able to login and browse site as an admin" do
14
14
login ( FactoryBot . create ( :admin ) )
15
- assert_redirected_to manage_root_path
15
+ assert_redirected_to new_questionnaires_path
16
16
17
17
get manage_dashboard_index_path
18
18
assert_response :success
You can’t perform that action at this time.
0 commit comments