<commit_before>class FormAnswerPolicy < ApplicationPolicy
  def index?
    admin? || assessor?
  end

  def show_section_appraisal_moderated?
    subject.lead?(record) ||
      (record.assessor_assignments.moderated.submitted? && subject.primary?(record))
  end

  def review?
    record.award_year.current? &&
    (
      admin? ||
      subject.lead_or_assigned?(record)
    )
  end

  def show?
    admin? || assessor?
  end

  def update?
    admin? || subject.lead?(record)
  end
<commit_msg>Update FormAnswer policy to allow only superadmins to edit<commit_after>class FormAnswerPolicy < ApplicationPolicy
  def index?
    admin? || assessor?
  end

  def show_section_appraisal_moderated?
    subject.lead?(record) ||
      (record.assessor_assignments.moderated.submitted? && subject.primary?(record))
  end

  def review?
    record.award_year.current? &&
    (
      admin? ||
      subject.lead_or_assigned?(record)
    )
  end

  def show?
    admin? || assessor?
  end

  def edit?
    admin? && subject.superadmin?
  end

  def update?
    admin? || subject.lead?(record)
  end

{'fraction_non_alphanumeric': 0.10805860805860806, 'fraction_numerical': 0.0, 'mean_word_length': 3.155893536121673, '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': '953331', 'n_tokens_mistral': 377, 'n_tokens_neox': 359, 'n_words': 73}