diff --git a/curriculumsearch/src/main/java/com/roshka/configuration/WebSecurityConfig.java b/curriculumsearch/src/main/java/com/roshka/configuration/WebSecurityConfig.java index 08d65bc..d1279b2 100644 --- a/curriculumsearch/src/main/java/com/roshka/configuration/WebSecurityConfig.java +++ b/curriculumsearch/src/main/java/com/roshka/configuration/WebSecurityConfig.java @@ -51,6 +51,9 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { .authorizeRequests() .antMatchers("/").authenticated() .antMatchers("/home").authenticated() + .antMatchers("/cargo*").authenticated() + .antMatchers("/convocatoria*").authenticated() + .antMatchers("/tecnologia*").authenticated() .antMatchers("/postulantes").authenticated() .anyRequest().permitAll() .and() diff --git a/curriculumsearch/src/main/java/com/roshka/controller/RRHHUserController.java b/curriculumsearch/src/main/java/com/roshka/controller/RRHHUserController.java index ef5b0de..262fbfd 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/RRHHUserController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/RRHHUserController.java @@ -3,7 +3,6 @@ package com.roshka.controller; import com.roshka.modelo.RRHHUser; import com.roshka.repositorio.RRHHUserRepository; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; @@ -35,7 +34,10 @@ public class RRHHUserController { } @GetMapping("/login") - public String getLogin() { + public String getLogin(Model model, HttpServletRequest request) { + if(request.getParameter("error")!=null){ + model.addAttribute("error", "Credenciales Incorrectas"); + } return "login"; } diff --git a/curriculumsearch/src/main/webapp/jsp/alerts.jsp b/curriculumsearch/src/main/webapp/jsp/alerts.jsp new file mode 100644 index 0000000..173ec86 --- /dev/null +++ b/curriculumsearch/src/main/webapp/jsp/alerts.jsp @@ -0,0 +1,18 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + +