<commit_before>class ClientsController < ApplicationController
	def index
		@clients = Client.where("user_id = ?", session[:user_id])
	end
	def show
		@client = Client.find(params[:id])
		if @client.user_id != session[:user_id]
			#Need a permission denied page, for now set it to new
			render 'new'
		end	
	end
	def new
		@client = Client.new<commit_msg>Trying to view a client that doesn't exist or is not a FA's client now displays a 404 page -the 404 page displays oddly though. May change to a separate "permission denied" page later<commit_after>class ClientsController < ApplicationController
	def index
		@clients = Client.where("user_id = ?", session[:user_id])
	end
	def show
		@client = Client.find_by_id(params[:id])
		if @client.nil? || @client.user_id != session[:user_id]
			#This can be replaced with a custom "permission denied" or "no such client" page
			render :file => "/app/views/errors/error404.erb"
		end	
	end
	def new
		@client = Client.new
{'fraction_non_alphanumeric': 0.10341261633919338, 'fraction_numerical': 0.009307135470527405, 'mean_word_length': 4.2896174863387975, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '4875707', 'n_tokens_mistral': 333, 'n_tokens_neox': 303, 'n_words': 107}