Advertisement
Guest User

Untitled

a guest
Nov 19th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. authorizeRequests()
  2. .antMatchers("/api/users/is_email_free").permitAll()
  3. .antMatchers("/api/login").permitAll()
  4. .antMatchers("/api/login2").permitAll()
  5. .antMatchers("/api/login3").permitAll()
  6. .antMatchers("/api/social").permitAll()
  7. .antMatchers(HttpMethod.POST, "/api/users").permitAll()
  8. .and()
  9. .authorizeRequests()
  10. .antMatchers(HttpMethod.POST, "/api/quizzes").hasAuthority("admin")
  11. .antMatchers(HttpMethod.PATCH, "/api/quizzes").hasAuthority("admin")
  12. .antMatchers(HttpMethod.PATCH, "/api/quizzes/{^[\\d]$}").hasAuthority("admin")
  13. .antMatchers(HttpMethod.PUT, "/api/quizzes/{^[\\d]$}").hasAuthority("admin")
  14. .antMatchers(HttpMethod.POST, "/api/questions").hasAuthority("admin")
  15. .antMatchers(HttpMethod.PATCH, "/api/questions").hasAuthority("admin")
  16. .antMatchers(HttpMethod.PATCH, "/api/questions/{^[\\d]$}").hasAuthority("admin")
  17. .antMatchers(HttpMethod.PUT, "/api/questions/{^[\\d]$}").hasAuthority("admin")
  18. .antMatchers(HttpMethod.POST, "/api/answers").hasAuthority("admin")
  19. .antMatchers(HttpMethod.PATCH, "/api/answers").hasAuthority("admin")
  20. .antMatchers(HttpMethod.PATCH, "/api/answers/{^[\\d]$}").hasAuthority("admin")
  21. .antMatchers(HttpMethod.PUT, "/api/answers/{^[\\d]$}").hasAuthority("admin")
  22. .antMatchers(HttpMethod.POST, "/api/events").hasAuthority("admin")
  23. .antMatchers(HttpMethod.PATCH, "/api/events").hasAuthority("admin")
  24. .antMatchers(HttpMethod.PATCH, "/api/events/{^[\\d]$}").hasAuthority("admin")
  25. .antMatchers(HttpMethod.PUT, "/api/events/{^[\\d]$}").hasAuthority("admin")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement