<commit_before>class UsersController < ApplicationController
  require 'digest/sha1'
  before_action :set_referer, only: [:show, :edit, :new]
  before_action force_ssl

  # GET /users
  # GET /users.json
  def index
    if @current_user.nil? or not @current_user.can_access?('user_list')
      flash[:alert] = (t :no_access)
      redirect_to :root and return
    else
      if @current_user.owner?
        @users = User.all.order('profile_id, username')
      else
        @users = User.order('profile_id, username').where('profile_id >= ?', 2)
        # @users = User.find(:all, :conditions => ['profile_id >= ?', 2], :order => 'profile_id, username')
      end
    end
  end
<commit_msg>Secure connection only in pages needed.<commit_after>class UsersController < ApplicationController
  require 'digest/sha1'
  before_action :set_referer, only: [:show, :edit, :new]
  force_ssl

  # GET /users
  # GET /users.json
  def index
    if @current_user.nil? or not @current_user.can_access?('user_list')
      flash[:alert] = (t :no_access)
      redirect_to :root and return
    else
      if @current_user.owner?
        @users = User.all.order('profile_id, username')
      else
        @users = User.order('profile_id, username').where('profile_id >= ?', 2)
        # @users = User.find(:all, :conditions => ['profile_id >= ?', 2], :order => 'profile_id, username')
      end
    end
  end

{'fraction_non_alphanumeric': 0.1372126436781609, 'fraction_numerical': 0.004310344827586207, 'mean_word_length': 3.273006134969325, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '1990420', 'n_tokens_mistral': 458, 'n_tokens_neox': 451, 'n_words': 110}