<commit_before>class PrivateMessagesController < ApplicationController
  
  before_filter :private_message, :only => [:check, :edit, :update]
  
  authorization_filter [ :manage, :message ], :user
  authorization_filter [ :forbidden_edit, :message ], :user, :only => [ :edit, :update ]

  def index
    if params[:sent_messages]
      @private_messages = PrivateMessage.find_all_by_sender_id(params[:user_id], :order => "created_at DESC").paginate(:page => params[:page], :per_page => 10)
    else  
      @private_messages = PrivateMessage.find_all_by_receiver_id(params[:user_id], :order => "created_at DESC").paginate(:page => params[:page], :per_page => 10)
    end<commit_msg>Remove PrivateMessages#update authorization filter to allow javascripi calls<commit_after>class PrivateMessagesController < ApplicationController
  
  before_filter :private_message, :only => [:check, :edit, :update]
  
  authorization_filter [ :manage, :message ], :user
  authorization_filter [ :forbidden_edit, :message ], :user, :only => [ :edit ]

  def index
    if params[:sent_messages]
      @private_messages = PrivateMessage.find_all_by_sender_id(params[:user_id], :order => "created_at DESC").paginate(:page => params[:page], :per_page => 10)
    else  
      @private_messages = PrivateMessage.find_all_by_receiver_id(params[:user_id], :order => "created_at DESC").paginate(:page => params[:page], :per_page => 10)
    end
{'fraction_non_alphanumeric': 0.1348870056497175, 'fraction_numerical': 0.005649717514124294, 'mean_word_length': 5.652582159624413, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '6193475', 'n_tokens_mistral': 447, 'n_tokens_neox': 434, 'n_words': 89}