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

pulibrary / tigerdata-app / 71d954da-08a6-4760-a6a6-2879d589de6f

28 Oct 2025 01:34PM UTC coverage: 72.228% (-19.1%) from 91.294%
71d954da-08a6-4760-a6a6-2879d589de6f

Pull #2057

circleci

web-flow
Merge branch 'main' into 2037-dashboard-mf
Pull Request #2057: Dashboard displays projects straights from Mediaflux

65 of 69 new or added lines in 4 files covered. (94.2%)

257 existing lines in 31 files now uncovered.

2221 of 3075 relevant lines covered (72.23%)

189.22 hits per line

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

19.05
/app/controllers/users/omniauth_callbacks_controller.rb
1
# frozen_string_literal: true
2
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
1✔
3
  def cas
1✔
UNCOV
4
    access_token = request.env["omniauth.auth"]
×
UNCOV
5
    @user = User.from_cas(access_token)
×
6

UNCOV
7
    set_cas_session
×
8

UNCOV
9
    if @user.nil? && access_token&.provider == "cas"
×
UNCOV
10
      Rails.logger.warn "User from CAS with netid #{access_token&.uid} was not found. Provider: cas"
×
UNCOV
11
      redirect_to help_path
×
UNCOV
12
      flash.notice = "You can not be signed in at this time."
×
UNCOV
13
    elsif @user.nil?
×
UNCOV
14
      Rails.logger.warn "User from CAS with netid #{access_token&.uid} was not found. Provider: #{access_token&.provider}"
×
UNCOV
15
      redirect_to root_path
×
UNCOV
16
      flash.alert = "You are not a recognized CAS user."
×
17
    else
UNCOV
18
      sign_in_and_redirect @user, event: :authentication # this will throw if @user is not activated
×
19
    end
20
  end
21

22
  private
1✔
23

24
    def set_cas_session
1✔
UNCOV
25
      strategy = request.env["omniauth.strategy"]
×
UNCOV
26
      if strategy.present?
×
27
        service_url = strategy.append_params(mediaflux_extra_url, { url: request.referer })
×
28
        session[:cas_login_url] = strategy.login_url(service_url)
×
29
        session[:cas_validation_url] = strategy.service_validate_url(service_url, "")
×
30
      end
31
    end
32
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

© 2025 Coveralls, Inc