[issue - 65] add access for gerUsers to security
@@ -6,6 +6,7 @@ import java.util.Collections;
import greencity.security.JwtTokenTool;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import org.springframework.http.HttpMethod;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
@@ -51,6 +52,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.hasAnyRole("USER", "ADMIN", "MODERATOR")
.antMatchers("/place/{status}")
.hasAnyRole("USER", "ADMIN", "MODERATOR")
+ .antMatchers(HttpMethod.GET, "/user")
+ .hasAnyRole("ADMIN")
.anyRequest()
.hasAnyRole("ADMIN")
.and()
