Update kotlin.adoc to add required spread operator(*)

Signed-off-by: Michael Samborski <msamborski@orbiscommunications.com>
This commit is contained in:
Michael Samborski 2025-04-01 10:41:22 -04:00 committed by Rob Winch
parent d864e51ff6
commit bfb4878e29

View File

@ -288,7 +288,7 @@ class BankingSecurityConfig {
open fun approvalsSecurityFilterChain(http: HttpSecurity): SecurityFilterChain { open fun approvalsSecurityFilterChain(http: HttpSecurity): SecurityFilterChain {
val approvalsPaths = arrayOf("/accounts/approvals/**", "/loans/approvals/**", "/credit-cards/approvals/**") val approvalsPaths = arrayOf("/accounts/approvals/**", "/loans/approvals/**", "/credit-cards/approvals/**")
http { http {
securityMatcher(approvalsPaths) securityMatcher(*approvalsPaths)
authorizeHttpRequests { authorizeHttpRequests {
authorize(anyRequest, hasRole("ADMIN")) authorize(anyRequest, hasRole("ADMIN"))
} }
@ -303,7 +303,7 @@ class BankingSecurityConfig {
val bankingPaths = arrayOf("/accounts/**", "/loans/**", "/credit-cards/**", "/balances/**") val bankingPaths = arrayOf("/accounts/**", "/loans/**", "/credit-cards/**", "/balances/**")
val viewBalancePaths = arrayOf("/balances/**") val viewBalancePaths = arrayOf("/balances/**")
http { http {
securityMatcher(bankingPaths) securityMatcher(*bankingPaths)
authorizeHttpRequests { authorizeHttpRequests {
authorize(viewBalancePaths, hasRole("VIEW_BALANCE")) authorize(viewBalancePaths, hasRole("VIEW_BALANCE"))
authorize(anyRequest, hasRole("USER")) authorize(anyRequest, hasRole("USER"))