Guest User

Untitled

a guest
Dec 18th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. @Override
  2. protected void configure(HttpSecurity http) throws Exception{
  3. http.authorizeRequests()
  4. .antMatchers("/").access("hasRole('ROLE_ADM') or hasRole('ROLE_VENDEDOR')")
  5. .antMatchers("/usuarios").access("hasRole('ROLE_ADM')")
  6. .antMatchers("/ventas").access("hasRole('ROLE_ADM') or hasRole('ROLE_VENDEDOR')")
  7. .antMatchers("/reportes").access("hasRole('ROLE_ADM')")
  8. .and().formLogin().loginPage("/login")
  9. .usernameParameter("user").passwordParameter("password")
  10. .and().csrf()
  11. .and().exceptionHandling().accessDeniedPage("/denied");
  12. }
Add Comment
Please, Sign In to add comment