<commit_before>class SessionsController < ApplicationController
  layout "sign_in"
  skip_before_action :login_required, only: [:new, :create]
  before_action :set_user

  def create
    if session_params[:name] != "admin"
      flash.now[:notice] = I18n.t("error.login_failed")
      return render :new
    end

    unless @user.authenticate(session_params[:password])
      flash.now[:notice] = I18n.t("error.login_failed")
      return render :new
    end<commit_msg>Add NOTE<commit_after>class SessionsController < ApplicationController
  layout "sign_in"
  skip_before_action :login_required, only: [:new, :create]
  before_action :set_user

  def create
    if session_params[:name] != "admin" # NOTE: Application user is "admin" only, other user name is invalid for now.
      flash.now[:notice] = I18n.t("error.login_failed")
      return render :new
    end

    unless @user.authenticate(session_params[:password])
      flash.now[:notice] = I18n.t("error.login_failed")
      return render :new
    end
{'fraction_non_alphanumeric': 0.11056268509378085, 'fraction_numerical': 0.007897334649555774, 'mean_word_length': 4.0954773869346734, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '234661', 'n_tokens_mistral': 321, 'n_tokens_neox': 308, 'n_words': 75}