Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Barrio_1
- Barrio_2
- Barrio_3
- Barrio_4
- usuario_1 (tendria que poder ver barrio_1 y 2)
- usuario_2 (tendria que poder ver barrio_3)
- usuario_3 (tendria que poder barrio 2 y 4)
- ROLE_BARRIO_1
- ROLE_BARRIO_2
- ROLE_BARRIO_3
- ROLE_BARRIO_4
- @Override
- protected void configure(HttpSecurity http) throws Exception {
- http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
- .and()
- .authorizeRequests()
- .antMatchers("/{idbarrio}/*") //la idea es comparar la url con el rol de manera dinamica.
- .hasRole("Barrio_{idbarrio}");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement