Commit 8bc5d7bc by Bogdan Andjelkovic

security updateovi

parent ad3b8e25
......@@ -41,7 +41,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.antMatchers("/profile/**","/moji-oglasi/**","/login-zahtev/**","/lista-korisnika","/novi-oglas/**").authenticated()
.antMatchers("/profile/**","/login-zahtev/**","/lista-korisnika","/novi-oglas/**","/lajkuj-oglas/**").authenticated()
.anyRequest().permitAll()
.and().formLogin().loginPage("/login").permitAll()
.usernameParameter("email")
......
......@@ -85,7 +85,7 @@ public class AppController
public String getChat(Model model,@AuthenticationPrincipal KorisnikDetails loggedUser, @RequestParam("email") String email)
{
if( loggedUser == null)
return "redirect:/moji-zahtevi";
return "redirect:/login";
model.addAttribute("loggedUser",loggedUser);
model.addAttribute("sagovornik",kRepo.findByEmail( email));
return "chat";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment