Skip to content

Commit 55d5d97

Browse files
committed
refactor: use nested builders for authorizeRequests() configuration
Part of #1149
1 parent 0616306 commit 55d5d97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/ru/mystamps/web/support/spring/security/SecurityConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ protected void configure(HttpSecurity http) throws Exception {
106106
new ContentSecurityPolicyHeaderWriter(useCdn, useSingleHost, hostname, h2ConsolePath);
107107

108108
http
109-
.authorizeRequests()
109+
.authorizeRequests(authorizeRequests -> authorizeRequests
110110
.mvcMatchers(CategoryUrl.ADD_CATEGORY_PAGE).hasAuthority(StringAuthority.CREATE_CATEGORY)
111111
.mvcMatchers(CountryUrl.ADD_COUNTRY_PAGE).hasAuthority(StringAuthority.CREATE_COUNTRY)
112112
.mvcMatchers(ParticipantUrl.ADD_PARTICIPANT_PAGE).hasAuthority(StringAuthority.ADD_PARTICIPANT)
@@ -132,7 +132,7 @@ protected void configure(HttpSecurity http) throws Exception {
132132
.mvcMatchers(HttpMethod.POST, SeriesSalesImportUrl.IMPORT_SERIES_SALES)
133133
.hasAuthority(StringAuthority.IMPORT_SERIES_SALES)
134134
.anyRequest().permitAll()
135-
.and()
135+
)
136136
.formLogin(formLogin -> formLogin
137137
.loginPage(AccountUrl.AUTHENTICATION_PAGE)
138138
.usernameParameter("login")

0 commit comments

Comments
 (0)