mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 07:45:49 +00:00
Reviews and login/logout security fixed
This commit is contained in:
parent
e5340de5aa
commit
d26a7582e5
1 changed files with 4 additions and 3 deletions
|
@ -37,7 +37,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
|
|||
.antMatchers("/users/new").permitAll()
|
||||
|
||||
.antMatchers("/login/**").anonymous()
|
||||
.antMatchers("/logout").permitAll()
|
||||
.antMatchers("/logout").authenticated()
|
||||
|
||||
.antMatchers("/usuarios/new").permitAll()
|
||||
.antMatchers("/admin/**").hasAnyAuthority("admin")
|
||||
|
@ -50,11 +50,12 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
|
|||
.antMatchers("/clients/new").permitAll()
|
||||
.antMatchers("/offers/**").permitAll()
|
||||
|
||||
.antMatchers("/reviews/**").authenticated()
|
||||
|
||||
.and().formLogin()
|
||||
.loginPage("/login").permitAll()
|
||||
.loginPage("/login")
|
||||
.failureUrl("/login?error")
|
||||
.and().logout().logoutSuccessUrl("/login");
|
||||
.and().logout().logoutSuccessUrl("/");
|
||||
|
||||
// Configuración para que funcione la consola de administración
|
||||
// de la BD H2 (deshabilitar las cabeceras de protección contra
|
||||
|
|
Loading…
Reference in a new issue