Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
SundarakrishnanN committed May 29, 2024
1 parent 7e1e8d1 commit e217dd4
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti

private static void getCustomizedHttpAuthorization(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry customizer) {
customizer
//
// .requestMatchers(HttpMethod.POST,"/user").hasRole("Admin")
// .requestMatchers(HttpMethod.PUT,"/user").hasRole("Admin")
// .requestMatchers(HttpMethod.DELETE,"/user").hasRole("Admin")
// .requestMatchers("/role").hasRole("Admin")
// .requestMatchers("/society").hasRole("Admin")
// .requestMatchers("/requestForm/byRequester").authenticated()

.requestMatchers(HttpMethod.POST,"/user").hasRole("Admin")
.requestMatchers(HttpMethod.PUT,"/user").hasRole("Admin")
.requestMatchers(HttpMethod.DELETE,"/user").hasRole("Admin")
.requestMatchers("/role").hasRole("Admin")
.requestMatchers("/society").hasRole("Admin")
.requestMatchers("/").permitAll()
.requestMatchers(EndpointRequest.toAnyEndpoint()).permitAll()
.anyRequest().authenticated();
Expand Down

0 comments on commit e217dd4

Please sign in to comment.