• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

uclibs / treatment_database / 0712f6bf-e09d-49c4-acac-bacdcc1113f1

22 May 2025 12:48PM UTC coverage: 99.536%. First build
0712f6bf-e09d-49c4-acac-bacdcc1113f1

push

circleci

web-flow
Upgrades Brakeman and fixes vulnerabilities. (#636)

Co-authored-by: Thomas Scherz <scherztc@ucmail.uc.edu>

3 of 5 new or added lines in 3 files covered. (60.0%)

644 of 647 relevant lines covered (99.54%)

51.64 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/app/controllers/dev_sessions_controller.rb
1
# frozen_string_literal: true
2

3
class DevSessionsController < ApplicationController
3✔
4
  skip_before_action :authenticate_user!, only: %i[new create destroy]
3✔
5
  skip_before_action :check_user_active, only: %i[new create destroy]
3✔
6
  skip_before_action :validate_session_timeout, only: %i[new create destroy]
3✔
7

8
  def new
3✔
9
    redirect_to params[:target] || root_path, allow_other_host: false if user_signed_in?
19✔
10
  end
11

12
  def create
3✔
13
    username = params[:username].strip.downcase
65✔
14
    user = User.find_by(username: username)
65✔
15

16
    return handle_failed_login unless user
65✔
17

18
    handle_successful_login(user)
63✔
19
  end
20

21
  def destroy
3✔
22
    reset_session_and_cookies
5✔
NEW
23
    redirect_to root_path, allow_other_host: false, notice: 'Signed out successfully. (Development)'
5✔
24
  end
25

26
  private
3✔
27

28
  def handle_successful_login(user)
3✔
29
    reset_session_and_cookies
63✔
30
    session[:user_id] = user.id
63✔
31
    session[:last_seen] = Time.current
63✔
32
    redirect_to params[:target] || conservation_records_path, allow_other_host: false, notice: 'Signed in successfully. (Development)'
63✔
33
  end
34

35
  def handle_failed_login
3✔
36
    flash.now[:alert] = 'Invalid username'
2✔
37
    render :new
2✔
38
  end
39
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc