<commit_before>package org.innovateuk.ifs.security;

import org.innovateuk.ifs.async.controller.AwaitAllFuturesCompletionIntegrationTestHelper;
import org.innovateuk.ifs.async.controller.ThreadsafeModelAopIntegrationTestHelper;
import org.innovateuk.ifs.commons.AbstractServiceSecurityAnnotationsTest;
import org.innovateuk.ifs.commons.security.NotSecured;
import org.innovateuk.ifs.commons.security.evaluator.RootCustomPermissionEvaluator;
import org.innovateuk.ifs.exception.IfsErrorController;
import org.innovateuk.ifs.security.evaluator.CustomPermissionEvaluator;
import org.springframework.security.access.prepost.PostAuthorize;
import org.springframework.security.access.prepost.PostFilter;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PreFilter;
import org.springframework.stereotype.Controller;

import java.lang.annotation.Annotation;
import java.util.List;

import static java.util.Arrays.asList;
import static org.innovateuk.ifs.util.CollectionFunctions.union;

/**
 * Base class in the web core to ensure that all controllers are secured as appropriate.
 */
public abstract class AbstractWebServiceSecurityAnnotationsTest extends AbstractServiceSecurityAnnotationsTest {

    // classes to exclude from testing
    public static final List<Class<?>> GLOBAL_EXCLUDED_CLASSES = asList(
            IfsErrorController.class,
            ThreadsafeModelAopIntegrationTestHelper.class,
            AwaitAllFuturesCompletionIntegrationTestHelper.class);

    @Override
    protected final List<Class<? extends Annotation>> classLevelSecurityAnnotations() {
        return  asList(
                PreAuthorize.class,
                PostAuthorize.class
        );
    }

    // We currently do security at the controller level.
    @Override<commit_msg>Added test controller as exclusion to security tests<commit_after>package org.innovateuk.ifs.security;

import org.innovateuk.ifs.async.controller.AwaitAllFuturesCompletionIntegrationTestHelper;
import org.innovateuk.ifs.async.controller.ThreadsafeModelAopIntegrationTestHelper;
import org.innovateuk.ifs.async.controller.endtoend.EndToEndAsyncControllerTestController;
import org.innovateuk.ifs.commons.AbstractServiceSecurityAnnotationsTest;
import org.innovateuk.ifs.commons.security.NotSecured;
import org.innovateuk.ifs.commons.security.evaluator.RootCustomPermissionEvaluator;
import org.innovateuk.ifs.exception.IfsErrorController;
import org.innovateuk.ifs.security.evaluator.CustomPermissionEvaluator;
import org.springframework.security.access.prepost.PostAuthorize;
import org.springframework.security.access.prepost.PostFilter;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PreFilter;
import org.springframework.stereotype.Controller;

import java.lang.annotation.Annotation;
import java.util.List;

import static java.util.Arrays.asList;
import static org.innovateuk.ifs.util.CollectionFunctions.union;

/**
 * Base class in the web core to ensure that all controllers are secured as appropriate.
 */
public abstract class AbstractWebServiceSecurityAnnotationsTest extends AbstractServiceSecurityAnnotationsTest {

    // classes to exclude from testing
    public static final List<Class<?>> GLOBAL_EXCLUDED_CLASSES = asList(
            IfsErrorController.class,
            ThreadsafeModelAopIntegrationTestHelper.class,
            AwaitAllFuturesCompletionIntegrationTestHelper.class,
            EndToEndAsyncControllerTestController.class);

    @Override
    protected final List<Class<? extends Annotation>> classLevelSecurityAnnotations() {
        return  asList(
                PreAuthorize.class,
                PostAuthorize.class
        );
    }

    // We currently do security at the controller level.
    @Override
{'fraction_non_alphanumeric': 0.07352559106261367, 'fraction_numerical': 0.0, 'mean_word_length': 4.959752321981425, 'pattern_counts': {'":': 0, '<': 11, '<?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': '1226016', 'n_tokens_mistral': 1034, 'n_tokens_neox': 1024, 'n_words': 191}