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

pulibrary / tigerdata-app / e091d009-5a3a-4ffa-a23a-daa4e1d7e0e7

21 Oct 2025 09:38PM UTC coverage: 79.122% (-8.2%) from 87.292%
e091d009-5a3a-4ffa-a23a-daa4e1d7e0e7

push

circleci

web-flow
Bump vite from 5.4.20 to 5.4.21 in the npm_and_yarn group across 1 directory (#2062)

Bumps the npm_and_yarn group with 1 update in the / directory:
[vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).

Updates `vite` from 5.4.20 to 5.4.21
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/releases">vite's
releases</a>.</em></p>
<blockquote>
<h2>v5.4.21</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v5.4.21/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/blob/v5.4.21/packages/vite/CHANGELOG.md">vite's
changelog</a>.</em></p>
<blockquote>
<h2><!-- raw HTML omitted -->5.4.21 (2025-10-20)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix(dev): trim trailing slash before <code>server.fs.deny</code>
check (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20968">#20968</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20970">#20970</a>)
(<a
href="https://github.com/vitejs/vite/commit/<a class=hub.com/pulibrary/tigerdata-app/commit/cad1d31d0635dd8fd4ddfe6e5a92eb9ff13cd06c">cad1d31d0<a href="https://github.com/pulibrary/tigerdata-app/commit/b45666a26476ff4bf99d2a0465a0b5ebbdf98838">&quot;&gt;cad1d31&lt;/a&gt;),
closes &lt;a
href=&quot;https://redirect.github.com/vitejs/vite/issues/20968&quot;&gt;#20968&lt;/a&gt;
&lt;a
href=&quot;https://redirect.github.com/vitejs/vite/issues/20970">#20970</a></li>
<li>chore: update CHANGELOG (<a
href="https://github.com/vitejs/vite/commit/<a class="double-link" href="https://github.com/pulibrary/tigerdata-app/commit/ca88ed7398288ce0c60176ac9a6392f10654c67c">ca88ed739</a><a href="https://github.com/pulibrary/tigerdata-app/commit/b45666a26476ff4bf99d2a0465a0b5ebbdf98838">&quot;&gt;ca88ed7&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/details&gt;
&lt;details&gt;
&lt;summary&gt;Commits&lt;/summary&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a
href=&quot;https://github.com/vitejs/vite/commit/</a><a class="double-link" href="https://github.com/pulibrary/tigerdata-app/commit/adce3c22c64cc9d44cc8f45cc92b543e3e4bf385">adce3c22c">adce3c2
release: v5.4.21
  • cad1d31 fix(dev): trim trailing slash before server.fs.deny check (
  • 2380 of 3008 relevant lines covered (79.12%)

    148.71 hits per line

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

    62.79
    /app/controllers/application_controller.rb
    1
    # frozen_string_literal: true
    
    2
    class ApplicationController < ActionController::Base
    
    2✔
    3
      protect_from_forgery with: :exception
    
    2✔
    4
      before_action :authenticate_user!
    
    2✔
    5
      before_action :mediaflux_session
    
    2✔
    6
      around_action :mediaflux_session_errors
    
    2✔
    7
      around_action :mediaflux_login_errors
    
    2✔
    8
      before_action :emulate_user
    
    2✔
    9
      before_action :downtime_check
    
    2✔
    10
    
    
    11
      helper_method :breadcrumbs
    
    2✔
    12
    
    
    13
      def new_session_path(_scope)
    
    2✔
    14
        new_user_session_path
    
    ×
    15
      end
    
    16
    
    
    17
      def after_sign_in_path_for(_resource)
    
    2✔
    18
        mediaflux_passthru_path
    
    ×
    19
        # "/users/#{@user.id}"
    
    20
      end
    
    21
    
    
    22
      def require_admin_user
    
    2✔
    23
        head :forbidden unless current_user&.eligible_sysadmin?
    
    4✔
    24
      end
    
    25
    
    
    26
      def breadcrumbs
    
    2✔
    27
        @breadcrumbs ||= []
    
    685✔
    28
      end
    
    29
    
    
    30
      def add_breadcrumb(name, path = nil)
    
    2✔
    31
        breadcrumbs << Breadcrumb.new(name, path)
    
    367✔
    32
      end
    
    33
    
    
    34
      # Render a 404 page for any undefined route
    
    35
      def render_not_found
    
    2✔
    36
        render file: Rails.public_path.join("404.html").to_s, layout: false, status: :not_found
    
    ×
    37
      end
    
    38
    
    
    39
      private
    
    2✔
    40
    
    
    41
        def mediaflux_session
    
    2✔
    42
          logger.debug "Application Session #{session[:mediaflux_session]} cas: #{session[:active_web_user]}"
    
    460✔
    43
          unless ["passthru", "cas"].include?(action_name)
    
    460✔
    44
            current_user&.mediaflux_from_session(session)
    
    460✔
    45
          end
    
    46
        end
    
    47
    
    
    48
        def mediaflux_session_errors
    
    2✔
    49
          yield
    
    460✔
    50
        rescue ActionView::Template::Error, Mediaflux::SessionExpired => e
    
    51
          raise unless e.is_a?(Mediaflux::SessionExpired) || e.cause.is_a?(Mediaflux::SessionExpired)
    
    ×
    52
          if session[:active_web_user]
    
    ×
    53
            redirect_to mediaflux_passthru_path(path: request.path)
    
    ×
    54
          elsif session_error_handler
    
    ×
    55
            retry
    
    ×
    56
          else
    
    57
            raise
    
    ×
    58
          end
    
    59
        end
    
    60
    
    
    61
        def mediaflux_login_errors
    
    2✔
    62
          yield
    
    460✔
    63
        rescue Mediaflux::SessionError
    
    64
          if session_error_handler
    
    ×
    65
            retry
    
    ×
    66
          else
    
    67
            raise
    
    ×
    68
          end
    
    69
        end
    
    70
    
    
    71
        def session_error_handler
    
    2✔
    72
          @retry_count ||= 0
    
    ×
    73
          @retry_count += 1
    
    ×
    74
    
    
    75
          current_user.clear_mediaflux_session(session)
    
    ×
    76
          current_user.mediaflux_from_session(session)
    
    ×
    77
          @retry_count < 3 # If the session is expired we should not have to retry more than once, but let's have a little wiggle room
    
    ×
    78
        end
    
    79
    
    
    80
        def emulate_user
    
    2✔
    81
          return if Rails.env.production?
    
    460✔
    82
          return if current_user.blank? || !current_user.trainer
    
    434✔
    83
    
    
    84
          if session[:emulation_role]
    
    26✔
    85
            if session[:emulation_role] == "Eligible Data Sponsor"
    
    8✔
    86
              emulate_sponsor
    
    2✔
    87
            elsif session[:emulation_role] == "Eligible Data Manager"
    
    6✔
    88
              emulate_manager
    
    2✔
    89
            elsif session[:emulation_role] == "System Administrator"
    
    4✔
    90
              emulate_sysadmin
    
    4✔
    91
            elsif session[:emulation_role] == "Eligible Data User"
    
    ×
    92
              emulate_data_user
    
    ×
    93
            elsif session[:emulation_role] == "Return to Self"
    
    ×
    94
              return_to_self
    
    ×
    95
            end
    
    96
          end
    
    97
        end
    
    98
    
    
    99
        def emulate_sponsor
    
    2✔
    100
          current_user.eligible_sponsor = true
    
    2✔
    101
          current_user.eligible_manager = false
    
    2✔
    102
          current_user.sysadmin = false
    
    2✔
    103
        end
    
    104
    
    
    105
        def emulate_manager
    
    2✔
    106
          current_user.eligible_manager = true
    
    2✔
    107
          current_user.eligible_sponsor = false
    
    2✔
    108
          current_user.sysadmin = false
    
    2✔
    109
        end
    
    110
    
    
    111
        def emulate_sysadmin
    
    2✔
    112
          current_user.sysadmin = true
    
    4✔
    113
          current_user.eligible_manager = false
    
    4✔
    114
          current_user.eligible_sponsor = false
    
    4✔
    115
        end
    
    116
    
    
    117
        def emulate_data_user
    
    2✔
    118
          current_user.eligible_sponsor = false
    
    ×
    119
          current_user.eligible_manager = false
    
    ×
    120
          current_user.sysadmin = false
    
    ×
    121
          current_user.trainer = false
    
    ×
    122
        end
    
    123
    
    
    124
        def return_to_self
    
    2✔
    125
          current_user.eligible_sponsor = false
    
    ×
    126
          current_user.eligible_manager = false
    
    ×
    127
          current_user.sysadmin = false
    
    ×
    128
        end
    
    129
    
    
    130
        def downtime_check
    
    2✔
    131
          if Flipflop.disable_login?
    
    427✔
    132
            if current_user&.eligible_sysadmin?
    
    ×
    133
              flash[:notice] = I18n.t(:only_sysadmin_users)
    
    ×
    134
            else
    
    135
              redirect_to root_path
    
    ×
    136
              flash[:notice] = I18n.t(:no_login_currently)
    
    ×
    137
            end
    
    138
          end
    
    139
        end
    
    140
    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