diff --git a/src/main/java/uk/gov/hmcts/ccd/SecurityConfiguration.java b/src/main/java/uk/gov/hmcts/ccd/SecurityConfiguration.java index 9b8decc0da..ce4e0f3ad3 100644 --- a/src/main/java/uk/gov/hmcts/ccd/SecurityConfiguration.java +++ b/src/main/java/uk/gov/hmcts/ccd/SecurityConfiguration.java @@ -58,7 +58,8 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter { "/status/health", "/swagger-resources/**", "/swagger-ui/**", - "/webjars/**" + "/webjars/**", + "/testing-support/cleanup-case-type/**" }; @Inject diff --git a/src/main/java/uk/gov/hmcts/ccd/v2/external/controller/TestingSupportController.java b/src/main/java/uk/gov/hmcts/ccd/v2/external/controller/TestingSupportController.java index 78922a6505..80b5e99bc8 100644 --- a/src/main/java/uk/gov/hmcts/ccd/v2/external/controller/TestingSupportController.java +++ b/src/main/java/uk/gov/hmcts/ccd/v2/external/controller/TestingSupportController.java @@ -7,7 +7,6 @@ import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.type.StringType; -import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; @@ -60,7 +59,6 @@ public ResponseEntity getCaseLink(@PathVariable("caseReferenc @ApiResponse(code = 404, message = "Unable to find case type"), @ApiResponse(code = 500, message = "Unexpected error") }) - @ConditionalOnExpression("${testing-support-endpoints.enabled:false}") public void dataCaseTypeIdDelete( @ApiParam(value = "Change ID", required = true) @PathVariable("changeId") BigInteger changeId, @ApiParam(value = "Case Type ID", required = true) @RequestParam("caseTypeIds") String caseTypeIds) { diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 9fad552c35..e3fe6a257c 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -284,6 +284,3 @@ reference.data.api.url=${RD_LOCATION_REF_API_BASE_URL:http://localhost:5555} reference.data.cache.ttl.in.days=5 # Refresh cache once everyday at 4am reference.data.cache.refresh.rate.cron=0 0 4 * * ? - -# Testing support endpoints -testing-support-endpoints.enabled=${TESTING_SUPPORT_ENDPOINTS_ENABLED:false} diff --git a/src/test/resources/test.properties b/src/test/resources/test.properties index 38bf3dda99..648055f6fa 100644 --- a/src/test/resources/test.properties +++ b/src/test/resources/test.properties @@ -46,5 +46,3 @@ case.data.issue.logging.jurisdictions=EMPLOYMENT reference.data.api.url=http://localhost:${wiremock.server.port} # @see ScheduledTaskRegistrar#CRON_DISABLED reference.data.cache.refresh.rate.cron=- - -testing-support-endpoints.enabled=true