<commit_before>module TranslationCenter
  class ApplicationController < ActionController::Base
    before_filter :translation_langs_filters
    before_filter :authenticate_user!

    # defaults
    def translation_langs_filters
      session[:current_filter] ||= 'untranslated'
      session[:lang_from] ||= :en
      session[:lang_to] ||= :en
      I18n.locale = session[:lang_from] || I18n.default_locale
    end

    protected
      def can_admin?
        current_user.respond_to?(:can_admin_translations?) && current_user.can_admin_translations?
      end

  end
end<commit_msg>removed not needed code in can_admin before filter<commit_after>module TranslationCenter
  class ApplicationController < ActionController::Base
    before_filter :translation_langs_filters
    before_filter :authenticate_user!

    # defaults
    def translation_langs_filters
      session[:current_filter] ||= 'untranslated'
      session[:lang_from] ||= :en
      session[:lang_to] ||= :en
      I18n.locale = session[:lang_from] || I18n.default_locale
    end

    protected
      def can_admin?
        current_user.can_admin_translations?
      end

  end
end
{'fraction_non_alphanumeric': 0.08195292066259809, 'fraction_numerical': 0.006974716652136007, 'mean_word_length': 3.8438818565400843, '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': '2558766', 'n_tokens_mistral': 345, 'n_tokens_neox': 329, 'n_words': 65}