<commit_before>class GradingConflictController < ApplicationController

    # TODO: Add validation to confirm creation can only be done by a:
    #   - Grader in the course
    #   - Professor in the course
    #   - Admin (regardless of role in the course)
    
    # TODO: Add validation to confirm editing/deleting of conflict can only be 
    # done by a:
    #   - Professor in the course
    #   - Admin (regardless of role in the course)

    def index
    end

    def show
    end

    def create
    end

    def delete
    end

    def update
    end
    
end
<commit_msg>added validation to grading conflict controller.<commit_after>class GradingConflictController < ApplicationController

    before_action :require_admin_or_staff
    before_action :require_admin_or_prof, only: [:delete, :update]

    def index
    end

    # TODO: Should there be a show method? May not be enough info/data
    # to warrant showing an individual one since it's essentially
    # just a pair of usernames.

    def create
    end

    def delete
    end

    def update
    end

    private

    # TODO: Add param methods
    
end

{'fraction_non_alphanumeric': 0.04428697962798937, 'fraction_numerical': 0.0, 'mean_word_length': 2.4138972809667676, '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': '3425485', 'n_tokens_mistral': 322, 'n_tokens_neox': 303, 'n_words': 130}