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

pulibrary / tigerdata-app / b2526f44-c626-457e-977c-fbdb80384bf6

15 Aug 2025 04:02PM UTC coverage: 71.795% (-4.7%) from 76.467%
b2526f44-c626-457e-977c-fbdb80384bf6

Pull #1669

circleci

JaymeeH
disable sha1 after the test suite is done, for real this time
Pull Request #1669: Integrate TigerData into the Nomad infrastructure

2128 of 2964 relevant lines covered (71.79%)

75.66 hits per line

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

0.0
/app/controllers/users_controller.rb
1
# frozen_string_literal: true
2
class UsersController < ApplicationController
×
3
  before_action :set_breadcrumbs
×
4
  before_action :check_user_access
×
5

6
  def index
×
7
    @users = User.order("uid ASC NULLS LAST").page params[:page]
×
8
  end
×
9

10
  def show
×
11
    add_breadcrumb("User")
×
12
    @user = User.find(params[:id])
×
13
  end
×
14

15
  def edit
×
16
    add_breadcrumb("Edit User")
×
17
    @user = User.find(params[:id])
×
18
  end
×
19

20
  def update
×
21
    update_user_with_params
×
22
    redirect_to user_path(@user)
×
23
  rescue => ex
×
24
    short_message = "Error saving user #{params[:id]}"
×
25
    Rails.logger.error "#{short_message}: #{ex.message}"
×
26
    Honeybadger.notify "#{short_message}: #{ex.message}"
×
27
    flash[:alert] = short_message
×
28
    redirect_to user_path(id: params[:id])
×
29
  end
×
30

31
  private
×
32

33
    def set_breadcrumbs
×
34
      add_breadcrumb("Users", users_path)
×
35
    end
×
36

37
    def check_user_access
×
38
      return if current_user.superuser || current_user.sysadmin || current_user.trainer
×
39
      flash[:notice] = "You do not have access to this page (#{current_user.uid})"
×
40
      redirect_to dashboard_path
×
41
    end
×
42

43
    # rubocop:disable Metrics/AbcSize
44
    def update_user_with_params
×
45
      @user = User.find(params[:id])
×
46
      @user.given_name = params["user"]["given_name"]
×
47
      @user.family_name = params["user"]["family_name"]
×
48
      @user.display_name = params["user"]["display_name"]
×
49
      @user.eligible_sponsor = params["user"]["eligible_sponsor"] == "1"
×
50
      @user.eligible_manager = params["user"]["eligible_manager"] == "1"
×
51
      @user.superuser = params["user"]["superuser"] == "1"
×
52
      @user.sysadmin = params["user"]["sysadmin"] == "1"
×
53
      @user.trainer = params["user"]["trainer"] == "1"
×
54
      @user.save!
×
55
    end
×
56
  # rubocop:enable Metrics/AbcSize
57
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