|
@@ -53,8 +53,6 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|
|
.addFilterBefore(filter, UsernamePasswordAuthenticationFilter.class)
|
|
.addFilterBefore(filter, UsernamePasswordAuthenticationFilter.class)
|
|
|
|
|
|
|
|
.authorizeRequests()
|
|
.authorizeRequests()
|
|
|
- // 为保证风格一致,以及保证鉴权完备,拒绝所有以 / 结尾的请求,只有无 / 结尾的请求才可被访问
|
|
|
|
|
- .antMatchers("/**/").denyAll()
|
|
|
|
|
// API Test Controller
|
|
// API Test Controller
|
|
|
.antMatchers(HttpMethod.GET, "/test/list/{projectId}").access("@authTools.checkProjOwnership(#projectId)")
|
|
.antMatchers(HttpMethod.GET, "/test/list/{projectId}").access("@authTools.checkProjOwnership(#projectId)")
|
|
|
.antMatchers(HttpMethod.GET, "/test/delete/{testId}").access("@authTools.checkTestOwnership(#testId)")
|
|
.antMatchers(HttpMethod.GET, "/test/delete/{testId}").access("@authTools.checkTestOwnership(#testId)")
|