app/controllers/dashboard_controller.rb
# Methods to handle login/authenticate/logout functions
Methods to handle login/authenticate/logout functions
Methods to handle login / authenticate / logout functions
def login
    if ext_auth?(:saml_enabled) && ext_auth?(:local_login_disabled)
      redirect_to saml_protected_page
      return
    end
    if get_vmdb_config[:product][:allow_passed_in_credentials]  
      @user_name     = params[:user_name]
      @user_password = params[:user_password]
    end
    css = @settings[:css] if @settings && @settings[:css] 
    @settings = copy_hash(DEFAULT_SETTINGS)               
    @settings[:css] = css if css                          
    @more = params[:type] && params[:type] != "less"
    flash[:notice] = _("Session was timed out due to inactivity. Please log in again.") if params[:timeout] == "true"
    logon_details = MiqServer.my_server(true).logon_status_details
    @login_message = logon_details[:message] if logon_details[:status] == :starting && logon_details[:message]
    if session[:user_validation_error]
      add_flash(session[:user_validation_error], :error)
      session[:user_validation_error] = nil
    end
    render :layout => "login"
  end
def login if ext_auth? ( :saml_enabled ) && ext_auth? ( :local_login_disabled ) redirect_to saml_protected_page return end if get_vmdb_config [ :product ] [ :allow_passed_in_credentials ] @user_name = params [ :user_name ] @user_password = params [ :user_password ] end css = @settings [ :css ] if @settings && @settings [ :css ] @settings = copy_hash ( DEFAULT_SETTINGS ) @settings [ :css ] = css if css @more = params [ :type ] && params [ :type ] != "less" flash [ :notice ] = _ ( "Session was timed out due to inactivity. Please log in again." ) if params [ :timeout ] == "true" logon_details = MiqServer . my_server ( true ) . logon_status_details @login_message = logon_details [ :message ] if logon_details [ :status ] == :starting && logon_details [ :message ] if session [ :user_validation_error ] add_flash ( session [ :user_validation_error ] , :error ) session [ :user_validation_error ] = nil end render :layout => "login" end
Methods to handle login/authenticate/logout functions
Methods to handle login / authenticate / logout functions
# Only pre-populate credentials if setting is turned on # Save prior CSS settings # Need settings, else pages won't display # Restore CSS settings for other tabs previusly logged in