<commit_before>class UsersController < ApplicationController

  before_filter :require_no_user, :only => [ :new, :create, :activate ]
  before_filter [ :require_user, :check_permissions ],
                :only => [ :edit, :update, :regenerate_api_key ]

  def index
    @users = User.all
    @title = @users.length.to_s + " users"
  end

  def show
    @events = TimelineEvent.recent_for_user(object)
    respond_to do |format|
      format.html { set_atom_link(self, object) }
      format.atom {}
    end
  rescue
    rescue_404
  end

  def new
    @user = User.new<commit_msg>Changes to UsersController, mainly for cancan<commit_after>class UsersController < ApplicationController

  before_filter :require_no_user, :only => [ :new, :create, :activate ]
  before_filter :require_user, :only => [:regenerate_api_key, :edit]

  load_and_authorize_resource

  def index
    @users = User.all
    @title = @users.length.to_s + " users"
  end

  def show
    @events = TimelineEvent.recent_for_user(object)
    set_atom_link(self, object)
  end

  def new
    @user = User.new
{'fraction_non_alphanumeric': 0.10315985130111524, 'fraction_numerical': 0.0027881040892193307, 'mean_word_length': 3.506276150627615, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4022372', 'n_tokens_mistral': 366, 'n_tokens_neox': 351, 'n_words': 81}