<commit_before>class TypusController < ApplicationController

  unloadable

  layout :select_layout

  include Typus::Authentication
  include Typus::Locale
  include Typus::QuickEdit
  include Typus::Reloader

  if Typus::Configuration.options[:ssl]
    include SslRequirement
    ssl_required :sign_in, :sign_out, 
                 :dashboard, 
                 :recover_password, :reset_password
  end

  filter_parameter_logging :password

  before_filter :set_locale

  before_filter :reload_config_et_roles
  before_filter :require_login, 
                :except => [ :sign_up, :sign_in, :sign_out, 
                             :recover_password, :reset_password, 
                             :quick_edit ]

  before_filter :check_if_user_can_perform_action_on_resource_without_model, 
                :except => [ :sign_up, :sign_in, :sign_out, 
                             :dashboard, 
                             :recover_password, :reset_password, 
                             :quick_edit, :set_locale ]

  before_filter :recover_password_disabled?, 
                :only => [ :recover_password, :reset_password ]

  def dashboard
    flash[:notice] = _("There are not defined applications in config/typus/*.yml.") if Typus.applications.empty?
  end

  def sign_in

    redirect_to admin_sign_up_path and return if Typus.user_class.count.zero?<commit_msg>Added :set_locale as an SSL action to avoid redirections ...<commit_after>class TypusController < ApplicationController

  unloadable

  layout :select_layout

  include Typus::Authentication
  include Typus::Locale
  include Typus::QuickEdit
  include Typus::Reloader

  if Typus::Configuration.options[:ssl]
    include SslRequirement
    ssl_required :sign_in, :sign_out, 
                 :dashboard, 
                 :recover_password, :reset_password, 
                 :set_locale
  end

  filter_parameter_logging :password

  before_filter :set_locale

  before_filter :reload_config_et_roles
  before_filter :require_login, 
                :except => [ :sign_up, :sign_in, :sign_out, 
                             :recover_password, :reset_password, 
                             :quick_edit ]

  before_filter :check_if_user_can_perform_action_on_resource_without_model, 
                :except => [ :sign_up, :sign_in, :sign_out, 
                             :dashboard, 
                             :recover_password, :reset_password, 
                             :quick_edit, :set_locale ]

  before_filter :recover_password_disabled?, 
                :only => [ :recover_password, :reset_password ]

  def dashboard
    flash[:notice] = _("There are not defined applications in config/typus/*.yml.") if Typus.applications.empty?
  end

  def sign_in

    redirect_to admin_sign_up_path and return if Typus.user_class.count.zero?
{'fraction_non_alphanumeric': 0.0744153082919915, 'fraction_numerical': 0.0, 'mean_word_length': 2.4259708737864076, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '5197861', 'n_tokens_mistral': 835, 'n_tokens_neox': 780, 'n_words': 163}