-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add authorizeHttpRequests to Kotlin DSL #10895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @ysavchen! I've left some feedback inline.
I'd also like to have @eleftherias take a look since she is quite a bit more familiar with the Kotlin DSL than I am.
.../main/kotlin/org/springframework/security/config/annotation/web/AbstractRequestMatcherDsl.kt
Outdated
Show resolved
Hide resolved
...c/main/kotlin/org/springframework/security/config/annotation/web/AuthorizeHttpRequestsDsl.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @ysavchen!
I would like to have a test for what happens when we use both authorizeRequests
and authorizeHttpRequests
in the Kotlin DSL.
I've also left one commend inline.
...c/main/kotlin/org/springframework/security/config/annotation/web/AuthorizeHttpRequestsDsl.kt
Outdated
Show resolved
Hide resolved
Hi, @ysavchen. Are you able to make the requested changes? |
Sorry for delay @jzheaux. I needed some time to analyze the options. |
Closes gh-10481
Comparing to
AuthorizeRequestsDslTests
, the newly addedAuthorizeHttpRequestsDslTests
does not include the following test:As far as I understand
authorizeHttpRequests
API does not provide SpEL support and this test seems obsolete.But due to default value for access parameter, there is a mismatch between
authorizeRequests
andauthorizeHttpRequets
API: