Skip to content

Commit

Permalink
Merge pull request #2335 from hmcts/testing-support-auth-whitelist
Browse files Browse the repository at this point in the history
Add testing-support/cleanup-case-type to security whitelist
  • Loading branch information
jasonpaige authored Nov 22, 2023
2 parents 0fd63d8 + 81ab36c commit 6b62658
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/main/java/uk/gov/hmcts/ccd/SecurityConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
"/status/health",
"/swagger-resources/**",
"/swagger-ui/**",
"/webjars/**"
"/webjars/**",
"/testing-support/cleanup-case-type/**"
};

@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -60,7 +59,6 @@ public ResponseEntity<CaseLinksResource> 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) {
Expand Down
3 changes: 0 additions & 3 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 0 additions & 2 deletions src/test/resources/test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6b62658

Please sign in to comment.