Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- authorizeRequests()
- .antMatchers("/api/users/is_email_free").permitAll()
- .antMatchers("/api/login").permitAll()
- .antMatchers("/api/login2").permitAll()
- .antMatchers("/api/login3").permitAll()
- .antMatchers("/api/social").permitAll()
- .antMatchers(HttpMethod.POST, "/api/users").permitAll()
- .and()
- .authorizeRequests()
- .antMatchers(HttpMethod.POST, "/api/quizzes").hasAuthority("admin")
- .antMatchers(HttpMethod.PATCH, "/api/quizzes").hasAuthority("admin")
- .antMatchers(HttpMethod.PATCH, "/api/quizzes/{^[\\d]$}").hasAuthority("admin")
- .antMatchers(HttpMethod.PUT, "/api/quizzes/{^[\\d]$}").hasAuthority("admin")
- .antMatchers(HttpMethod.POST, "/api/questions").hasAuthority("admin")
- .antMatchers(HttpMethod.PATCH, "/api/questions").hasAuthority("admin")
- .antMatchers(HttpMethod.PATCH, "/api/questions/{^[\\d]$}").hasAuthority("admin")
- .antMatchers(HttpMethod.PUT, "/api/questions/{^[\\d]$}").hasAuthority("admin")
- .antMatchers(HttpMethod.POST, "/api/answers").hasAuthority("admin")
- .antMatchers(HttpMethod.PATCH, "/api/answers").hasAuthority("admin")
- .antMatchers(HttpMethod.PATCH, "/api/answers/{^[\\d]$}").hasAuthority("admin")
- .antMatchers(HttpMethod.PUT, "/api/answers/{^[\\d]$}").hasAuthority("admin")
- .antMatchers(HttpMethod.POST, "/api/events").hasAuthority("admin")
- .antMatchers(HttpMethod.PATCH, "/api/events").hasAuthority("admin")
- .antMatchers(HttpMethod.PATCH, "/api/events/{^[\\d]$}").hasAuthority("admin")
- .antMatchers(HttpMethod.PUT, "/api/events/{^[\\d]$}").hasAuthority("admin")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement