Skip to content

Commit

Permalink
Remove auth-related flash warnings in Check
Browse files Browse the repository at this point in the history
We don't want to display these. Being redirected to the sign in page
provides sufficient context.
  • Loading branch information
malcolmbaig committed Oct 4, 2023
1 parent 84e11a3 commit 786e637
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions app/controllers/check_records/check_records_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def current_namespace

def authenticate_dsi_user!
if current_dsi_user.blank?
flash[:warning] = "You need to sign in to continue."
redirect_to check_records_sign_in_path
end
end
Expand All @@ -33,7 +32,6 @@ def handle_expired_session!
end

if Time.zone.at(session[:dsi_user_session_expiry]).past?
flash[:warning] = "Your session has expired. Please sign in again."
redirect_to check_records_sign_out_path
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/system/check_records/user_session_expires_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def and_my_session_expires
end

def then_i_am_required_to_sign_in_again
expect(page).to have_content "Your session has expired. Please sign in again."
expect(page).to have_content "Sign in to check a teacher’s record"
end

def when_i_refresh_the_page
Expand Down

0 comments on commit 786e637

Please sign in to comment.