SHARE
TWEET

Untitled

a guest Jun 16th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Barrio_1
  2. Barrio_2
  3. Barrio_3
  4. Barrio_4
  5.      
  6. usuario_1 (tendria que poder ver barrio_1 y 2)
  7. usuario_2 (tendria que poder ver barrio_3)
  8. usuario_3 (tendria que poder barrio 2 y 4)
  9.      
  10. ROLE_BARRIO_1
  11. ROLE_BARRIO_2
  12. ROLE_BARRIO_3
  13. ROLE_BARRIO_4
  14.      
  15. @Override
  16.     protected void configure(HttpSecurity http) throws Exception {
  17.  
  18.  http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)          
  19.                         .and()
  20.                         .authorizeRequests()
  21.                         .antMatchers("/{idbarrio}/*") //la idea es comparar la url con el rol de manera dinamica.
  22.                         .hasRole("Barrio_{idbarrio}");
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top