Class: WelcomeController

Inherits:
ApplicationController show all
Defined in:
app/controllers/welcome_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#add_breadcrumb, #after_sign_in_path_for, #breadcrumbs, #new_session_path, #render_not_found, #require_admin_user

Instance Method Details

#helpObject



18
# File 'app/controllers/welcome_controller.rb', line 18

def help; end

#indexObject



7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/welcome_controller.rb', line 7

def index
  if current_user.blank?
    render layout: "welcome"
  elsif Flipflop.disable_login?
    downtime_check(with_redirect: false)
    redirect_to dashboard_path if current_user&.eligible_sysadmin?
  else
    redirect_to dashboard_path
  end
end