|
|
@@ -109,6 +109,8 @@ public class SecurityConfig { |
|
|
.hasAnyAuthority("TESTING", "ADMIN") |
|
|
.hasAnyAuthority("TESTING", "ADMIN") |
|
|
.requestMatchers(HttpMethod.GET, "/label-printer-monitor/label-stats") |
|
|
.requestMatchers(HttpMethod.GET, "/label-printer-monitor/label-stats") |
|
|
.hasAnyAuthority("TESTING", "ADMIN") |
|
|
.hasAnyAuthority("TESTING", "ADMIN") |
|
|
|
|
|
.requestMatchers(HttpMethod.POST, "/stockAdjustment/submit") |
|
|
|
|
|
.hasAnyAuthority("ADMIN", "INVENTORY_ADJUST") |
|
|
.anyRequest().authenticated()) |
|
|
.anyRequest().authenticated()) |
|
|
.httpBasic(httpBasic -> httpBasic.authenticationEntryPoint( |
|
|
.httpBasic(httpBasic -> httpBasic.authenticationEntryPoint( |
|
|
(request, response, authException) -> sendUnauthorizedJson(response, "Unauthorized", "UNAUTHORIZED"))) |
|
|
(request, response, authException) -> sendUnauthorizedJson(response, "Unauthorized", "UNAUTHORIZED"))) |
|
|
|