From 6a6ceb7c87bf8efcd91a1b6b233acf28177c9fff Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Fri, 10 Jan 2020 12:04:51 +0000 Subject: [PATCH] Added email submission to secured routes --- .../main/kotlin/uk/co/neviyn/observationdatabase/Security.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Security.kt b/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Security.kt index 2689b2d..0be4d96 100644 --- a/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Security.kt +++ b/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Security.kt @@ -40,7 +40,7 @@ class CustomWebSecurityConfigurerAdapter : WebSecurityConfigurerAdapter() { @Throws(Exception::class) override fun configure(http: HttpSecurity) { http.csrf().disable().authorizeRequests() - .antMatchers(HttpMethod.POST, "/api/site", "/api/tutor", "/api/observation", "/api/grpob/start", "/api/grpob/complete").authenticated() + .antMatchers(HttpMethod.POST, "/api/site", "/api/tutor", "/api/observation", "/api/grpob/start", "/api/grpob/complete", "/api/observations/email").authenticated() .anyRequest().permitAll() .and() .httpBasic() @@ -70,4 +70,4 @@ class MyBasicAuthenticationEntryPoint : BasicAuthenticationEntryPoint() { realmName = "Security" super.afterPropertiesSet() } -} \ No newline at end of file +}