Commit 1d37a693 authored by Fabiano Sluzarski's avatar Fabiano Sluzarski
Browse files

Filtered lists and update encrypting and pulling old/new password

parent 14147c61
......@@ -160,9 +160,19 @@ public class Registration {
"select * from registration r, person p where grant_candidate = 't' and reg_status='Ativa' and"+
" not exists ( select * from student_grant sg where sg.registration = r.id and end_date is null )"+
" and r.student = p.id order by p.name", Registration.class).getResultList();
// "SELECT * FROM registration r, person p where"+
// " reg_status = 'Ativa' and grant_candidate = 'true' and r.student = p.id"+
// " order by p.name" falta verificar se ele tem uma bolsa ativa, query acima tenta solucionar isso
}
public static Object findRegistrations(String year, String kind, String status) {
String sql = "";
if (!year.isEmpty())
sql = sql + "extract (year from start_date)="+year+" and ";
if (!kind.isEmpty())
sql = sql + "reg_kind='"+kind+"' and ";
if (!status.isEmpty())
sql = sql + "reg_status='"+status+"' and ";
return entityManager().createNativeQuery(
"SELECT * FROM registration r, person p WHERE "+sql+
"r.student = p.id ORDER BY p.name" , Registration.class).getResultList();
}
public static Registration getAtiveRegistration(Student s) {
......
......@@ -48,6 +48,15 @@ public class SectionPos {
return entityManager().createNativeQuery("select * from Section_Pos a, course b where a.course = b.id order by b.code, name", SectionPos.class).getResultList();
}
public static Object findSectionPosesByYear(String year) {
String sql = null;
if (year.isEmpty())
sql = " order by section_year, period";
else
sql = " where section_year="+year+" order by section_year, period";
return entityManager().createNativeQuery("select * from Section_Pos"+sql, SectionPos.class).getResultList();
}
public static Object findSectionPosesByProfessor(String prof, String year, String period) {
String periodPart = "";
if (!(period.isEmpty()))
......@@ -70,7 +79,6 @@ public class SectionPos {
whereClause += " and professor = "+professor.intValue();
return entityManager().createNativeQuery("select * from Section_Pos a, course b where a.course = b.id "+whereClause+" order by b.code, name", SectionPos.class).getResultList();
}
}
......@@ -65,6 +65,18 @@ public class StudentGrant {
return entityManager().createNativeQuery("select * from student_grant sg, registration r, person p " +
"where sg.end_date IS NULL and sg.registration = r.id and r.student = p.id order by p.name", StudentGrant.class).getResultList();
}
public static Object findGrantsPerType(String type) {
String sql = null;
if (type.isEmpty())
sql = "";
if (type.equals("Ativa"))
sql = " sg.end_date IS NULL and";
if (type.equals("Terminada"))
sql = " sg.end_date IS NOT NULL and";
return entityManager().createNativeQuery("select * from student_grant sg, registration r, person p " +
"where"+sql+" sg.registration = r.id and r.student = p.id order by p.name", StudentGrant.class).getResultList();
}
public static void generateStatementGrant(StudentGrant sg, HttpServletResponse response) {
response.setContentType("application/pdf");
......
......@@ -72,6 +72,20 @@ public class Transcript {
" where t.student = "+r.getId()+" and t.transcript_section = sp.id order by sp.section_year, sp.period",Transcript.class).getResultList();
}
public static Object findTranscriptByYearOrProfessorOrAll(String year, String professor) {
String sql = null;
if (year.isEmpty() && professor.isEmpty())
sql = " where t.student=r.id and r.student=p.id order by p.name";
if (!year.isEmpty() && professor.isEmpty())
sql = ", section_pos sp where sp.section_year="+year+" and t.transcript_section = sp.id and t.student=r.id and r.student=p.id order by p.name";
if (year.isEmpty() && !professor.isEmpty())
sql = ", section_pos sp where sp.professor="+professor+" and t.transcript_section = sp.id and t.student=r.id and r.student=p.id order by p.name";
if (!year.isEmpty() && !professor.isEmpty())
sql = ", section_pos sp where sp.section_year="+year+" and sp.professor="+professor+" and t.transcript_section = sp.id and t.student=r.id and r.student=p.id order by p.name";
return entityManager().createNativeQuery("select * from transcript t, registration r, person p"+sql,Transcript.class).getResultList();
}
public static String convertConcept(ConceptTranscript concept) {
if (concept == ConceptTranscript.Nulo)
return "-";
......
......@@ -52,6 +52,28 @@ public class ProfessorController {
return "redirect:/professors/" + encodeUrlPathSegment(professor.getId().toString(), httpServletRequest);
}
@RequestMapping(method = RequestMethod.PUT)
public String update(@Valid Professor professor, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
uiModel.addAttribute("professor", professor);
addDateTimeFormatPatterns(uiModel);
return "professors/update";
}
if (!(professor.getPassword().isEmpty())) {
ShaPasswordEncoder encoder = new ShaPasswordEncoder(256);
professor.setPassword(encoder.encodePassword(professor.getPassword(), ""));
}
else {
Professor old = (Professor) Professor.entityManager().createNativeQuery("select * from person where id="+professor.getId(), Professor.class).getSingleResult();
professor.setPassword(old.getPassword());
}
uiModel.asMap().clear();
professor.merge();
return "redirect:/professors/" + encodeUrlPathSegment(professor.getId().toString(), httpServletRequest);
}
@ModelAttribute("userkinds")
public java.util.Collection<UserKind> populateUserKinds() {
return Arrays.asList(UserKind.Professor, UserKind.Administrador);
......
......@@ -66,18 +66,6 @@ privileged aspect ProfessorController_Roo_Controller {
return "professors/list";
}
@RequestMapping(method = RequestMethod.PUT)
public String ProfessorController.update(@Valid Professor professor, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
uiModel.addAttribute("professor", professor);
addDateTimeFormatPatterns(uiModel);
return "professors/update";
}
uiModel.asMap().clear();
professor.merge();
return "redirect:/professors/" + encodeUrlPathSegment(professor.getId().toString(), httpServletRequest);
}
@RequestMapping(value = "/{id}", params = "form", method = RequestMethod.GET)
public String ProfessorController.updateForm(@PathVariable("id") Long id, Model uiModel) {
uiModel.addAttribute("professor", Professor.findPerson(id));
......
......@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import br.ufpr.c3sl.sapos.models.location.City;
import br.ufpr.c3sl.sapos.models.people.Student;
import br.ufpr.c3sl.sapos.models.scholar.Registration;
import br.ufpr.c3sl.sapos.models.scholar.StudentGrant;
import br.ufpr.c3sl.sapos.models.scholar.Transcript;
import com.itextpdf.text.DocumentException;
......@@ -28,6 +29,20 @@ public class RegistrationController {
return Registration.findAllActiveRegistrations();
}
@RequestMapping(method = RequestMethod.GET)
public String listChoice() {
return "registrations/listchoice";
}
@RequestMapping(value="list",method = RequestMethod.GET)
public String list(@RequestParam(value = "year", required = false) String year,
@RequestParam(value = "kind", required = false) String kind,
@RequestParam(value = "status", required = false) String status,
Model model) {
model.addAttribute("registrations", Registration.findRegistrations(year, kind, status));
return "registrations/list";
}
@RequestMapping(value = "registrationspercourse", method = RequestMethod.GET)
public String studentsPerCourse() {
return "registrations/registrationspercourse";
......
......@@ -61,19 +61,19 @@ privileged aspect RegistrationController_Roo_Controller {
return "registrations/show";
}
@RequestMapping(method = RequestMethod.GET)
public String RegistrationController.list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
if (page != null || size != null) {
int sizeNo = size == null ? 10 : size.intValue();
uiModel.addAttribute("registrations", Registration.findRegistrationEntries(page == null ? 0 : (page.intValue() - 1) * sizeNo, sizeNo));
float nrOfPages = (float) Registration.countRegistrations() / sizeNo;
uiModel.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages));
} else {
uiModel.addAttribute("registrations", Registration.findAllRegistrations());
}
addDateTimeFormatPatterns(uiModel);
return "registrations/list";
}
// @RequestMapping(method = RequestMethod.GET)
// public String RegistrationController.list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
// if (page != null || size != null) {
// int sizeNo = size == null ? 10 : size.intValue();
// uiModel.addAttribute("registrations", Registration.findRegistrationEntries(page == null ? 0 : (page.intValue() - 1) * sizeNo, sizeNo));
// float nrOfPages = (float) Registration.countRegistrations() / sizeNo;
// uiModel.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages));
// } else {
// uiModel.addAttribute("registrations", Registration.findAllRegistrations());
// }
// addDateTimeFormatPatterns(uiModel);
// return "registrations/list";
// }
@RequestMapping(method = RequestMethod.PUT)
public String RegistrationController.update(@Valid Registration registration, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
......
......@@ -22,6 +22,18 @@ public class SectionPosController {
public Collection<Professor> populateProfessors() {
return Professor.findAllProfessors();
}
@RequestMapping(method = RequestMethod.GET)
public String listChoice() {
return "sectionposes/listchoice";
}
@RequestMapping(value="list",method = RequestMethod.GET)
public String list(@RequestParam(value = "year", required = false) String year,
Model model) {
model.addAttribute("sectionposes", SectionPos.findSectionPosesByYear(year));
return "sectionposes/list";
}
@RequestMapping(value = "sectionsselectchoice", method = RequestMethod.GET)
public String sectionsSelect() {
......
......@@ -51,18 +51,18 @@ privileged aspect SectionPosController_Roo_Controller {
return "sectionposes/show";
}
@RequestMapping(method = RequestMethod.GET)
public String SectionPosController.list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
if (page != null || size != null) {
int sizeNo = size == null ? 10 : size.intValue();
uiModel.addAttribute("sectionposes", SectionPos.findSectionPosEntries(page == null ? 0 : (page.intValue() - 1) * sizeNo, sizeNo));
float nrOfPages = (float) SectionPos.countSectionPoses() / sizeNo;
uiModel.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages));
} else {
uiModel.addAttribute("sectionposes", SectionPos.findAllSectionPoses());
}
return "sectionposes/list";
}
// @RequestMapping(method = RequestMethod.GET)
// public String SectionPosController.list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
// if (page != null || size != null) {
// int sizeNo = size == null ? 10 : size.intValue();
// uiModel.addAttribute("sectionposes", SectionPos.findSectionPosEntries(page == null ? 0 : (page.intValue() - 1) * sizeNo, sizeNo));
// float nrOfPages = (float) SectionPos.countSectionPoses() / sizeNo;
// uiModel.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages));
// } else {
// uiModel.addAttribute("sectionposes", SectionPos.findAllSectionPoses());
// }
// return "sectionposes/list";
// }
@RequestMapping(method = RequestMethod.PUT)
public String SectionPosController.update(@Valid SectionPos sectionPos, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
......
......@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import br.ufpr.c3sl.sapos.models.people.Professor;
import br.ufpr.c3sl.sapos.models.people.Staff;
import br.ufpr.c3sl.sapos.models.people.enums.UserKind;
......@@ -46,5 +47,27 @@ public class StaffController {
return "redirect:/staffs/" + encodeUrlPathSegment(staff.getId().toString(), httpServletRequest);
}
@RequestMapping(method = RequestMethod.PUT)
public String update(@Valid Staff staff, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
uiModel.addAttribute("staff", staff);
addDateTimeFormatPatterns(uiModel);
return "staffs/update";
}
if (!(staff.getPassword().isEmpty())) {
ShaPasswordEncoder encoder = new ShaPasswordEncoder(256);
staff.setPassword(encoder.encodePassword(staff.getPassword(), ""));
}
else {
Staff old = (Staff) Staff.entityManager().createNativeQuery("select * from person where id="+staff.getId(), Staff.class).getSingleResult();
staff.setPassword(old.getPassword());
}
uiModel.asMap().clear();
staff.merge();
return "redirect:/staffs/" + encodeUrlPathSegment(staff.getId().toString(), httpServletRequest);
}
}
......@@ -62,18 +62,6 @@ privileged aspect StaffController_Roo_Controller {
return "staffs/list";
}
@RequestMapping(method = RequestMethod.PUT)
public String StaffController.update(@Valid Staff staff, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
uiModel.addAttribute("staff", staff);
addDateTimeFormatPatterns(uiModel);
return "staffs/update";
}
uiModel.asMap().clear();
staff.merge();
return "redirect:/staffs/" + encodeUrlPathSegment(staff.getId().toString(), httpServletRequest);
}
@RequestMapping(value = "/{id}", params = "form", method = RequestMethod.GET)
public String StaffController.updateForm(@PathVariable("id") Long id, Model uiModel) {
uiModel.addAttribute("staff", Staff.findStaff(id));
......
......@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import br.ufpr.c3sl.sapos.models.location.City;
import br.ufpr.c3sl.sapos.models.people.Staff;
import br.ufpr.c3sl.sapos.models.people.Student;
import br.ufpr.c3sl.sapos.models.people.enums.GenderKind;
import br.ufpr.c3sl.sapos.models.people.enums.MaritalStatus;
......@@ -43,11 +44,33 @@ public class StudentController {
student.persist();
return "redirect:/students/" + encodeUrlPathSegment(student.getId().toString(), httpServletRequest);
}
@ModelAttribute("userkinds")
public java.util.Collection<UserKind> populateUserKinds() {
return Arrays.asList(UserKind.Aluno);
}
@RequestMapping(method = RequestMethod.PUT)
public String update(@Valid Student student, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
uiModel.addAttribute("student", student);
addDateTimeFormatPatterns(uiModel);
return "students/update";
}
if (!(student.getPassword().isEmpty())) {
ShaPasswordEncoder encoder = new ShaPasswordEncoder(256);
student.setPassword(encoder.encodePassword(student.getPassword(), ""));
}
else {
Student old = (Student) Student.entityManager().createNativeQuery("select * from person where id="+student.getId(), Student.class).getSingleResult();
student.setPassword(old.getPassword());
}
uiModel.asMap().clear();
student.merge();
return "redirect:/students/" + encodeUrlPathSegment(student.getId().toString(), httpServletRequest);
}
@ModelAttribute("userkinds")
public java.util.Collection<UserKind> populateUserKinds() {
return Arrays.asList(UserKind.Aluno);
}
@ModelAttribute("genders")
public java.util.Collection<GenderKind> populateGenderKinds() {
......
......@@ -63,18 +63,6 @@ privileged aspect StudentController_Roo_Controller {
return "students/list";
}
@RequestMapping(method = RequestMethod.PUT)
public String StudentController.update(@Valid Student student, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
uiModel.addAttribute("student", student);
addDateTimeFormatPatterns(uiModel);
return "students/update";
}
uiModel.asMap().clear();
student.merge();
return "redirect:/students/" + encodeUrlPathSegment(student.getId().toString(), httpServletRequest);
}
@RequestMapping(value = "/{id}", params = "form", method = RequestMethod.GET)
public String StudentController.updateForm(@PathVariable("id") Long id, Model uiModel) {
uiModel.addAttribute("student", Student.findPerson(id));
......
package br.ufpr.c3sl.sapos.web;
import java.util.Arrays;
import javax.servlet.http.HttpServletResponse;
import br.ufpr.c3sl.sapos.models.location.City;
import br.ufpr.c3sl.sapos.models.scholar.Registration;
import br.ufpr.c3sl.sapos.models.scholar.StudentGrant;
import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
......@@ -13,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import br.ufpr.c3sl.sapos.models.scholar.StudentGrant;
@RooWebScaffold(path = "studentgrants", formBackingObject = StudentGrant.class)
@RequestMapping("/studentgrants")
@Controller
......@@ -22,6 +23,22 @@ public class StudentGrantController {
return StudentGrant.findActiveStudentGrants();
}
@ModelAttribute("granttypes")
public java.util.Collection<String> populateGrantTypes() {
return Arrays.asList("", "Ativa", "Terminada");
}
@RequestMapping(method = RequestMethod.GET)
public String listChoice() {
return "studentgrants/listchoice";
}
@RequestMapping(value="list",method = RequestMethod.GET)
public String list(@RequestParam(value = "type", required = false) String type, Model model) {
model.addAttribute("studentgrants", StudentGrant.findGrantsPerType(type));
return "studentgrants/list";
}
@RequestMapping(value = "grantsperkind", method = RequestMethod.GET)
public String grantsPerKind() {
return "studentgrants/grantsperkind";
......
......@@ -54,19 +54,19 @@ privileged aspect StudentGrantController_Roo_Controller {
return "studentgrants/show";
}
@RequestMapping(method = RequestMethod.GET)
public String StudentGrantController.list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
if (page != null || size != null) {
int sizeNo = size == null ? 10 : size.intValue();
uiModel.addAttribute("studentgrants", StudentGrant.findStudentGrantEntries(page == null ? 0 : (page.intValue() - 1) * sizeNo, sizeNo));
float nrOfPages = (float) StudentGrant.countStudentGrants() / sizeNo;
uiModel.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages));
} else {
uiModel.addAttribute("studentgrants", StudentGrant.findAllStudentGrants());
}
addDateTimeFormatPatterns(uiModel);
return "studentgrants/list";
}
// @RequestMapping(method = RequestMethod.GET)
// public String StudentGrantController.list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
// if (page != null || size != null) {
// int sizeNo = size == null ? 10 : size.intValue();
// uiModel.addAttribute("studentgrants", StudentGrant.findStudentGrantEntries(page == null ? 0 : (page.intValue() - 1) * sizeNo, sizeNo));
// float nrOfPages = (float) StudentGrant.countStudentGrants() / sizeNo;
// uiModel.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages));
// } else {
// uiModel.addAttribute("studentgrants", StudentGrant.findAllStudentGrants());
// }
// addDateTimeFormatPatterns(uiModel);
// return "studentgrants/list";
// }
@RequestMapping(method = RequestMethod.PUT)
public String StudentGrantController.update(@Valid StudentGrant studentGrant, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
......
package br.ufpr.c3sl.sapos.web;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
......@@ -18,6 +21,27 @@ import br.ufpr.c3sl.sapos.models.scholar.Transcript;
@RequestMapping("/transcripts")
@Controller
public class TranscriptController {
@ModelAttribute("professors")
public java.util.Collection<Professor> populateProfessors() {
List<Professor> l = Professor.findAllProfessors();
Professor p = new Professor();
p.setName(" ");
l.add(0, p);
return l;
}
@RequestMapping(method = RequestMethod.GET)
public String listChoice() {
return "transcripts/listchoice";
}
@RequestMapping(value="list",method = RequestMethod.GET)
public String list(@RequestParam(value = "year", required = false) String year,
@RequestParam(value = "professor", required = false) String professor,
Model model) {
model.addAttribute("transcripts", Transcript.findTranscriptByYearOrProfessorOrAll(year,professor));
return "transcripts/list";
}
@RequestMapping(value = "transcriptsstatement", method = RequestMethod.GET)
public String transcriptsStatement() {
......
......@@ -57,19 +57,19 @@ privileged aspect TranscriptController_Roo_Controller {
return "transcripts/show";
}
@RequestMapping(method = RequestMethod.GET)
public String TranscriptController.list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
if (page != null || size != null) {
int sizeNo = size == null ? 10 : size.intValue();
uiModel.addAttribute("transcripts", Transcript.findTranscriptEntries(page == null ? 0 : (page.intValue() - 1) * sizeNo, sizeNo));
float nrOfPages = (float) Transcript.countTranscripts() / sizeNo;
uiModel.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages));
} else {
uiModel.addAttribute("transcripts", Transcript.findAllTranscripts());
}
addDateTimeFormatPatterns(uiModel);
return "transcripts/list";
}
// @RequestMapping(method = RequestMethod.GET)
// public String TranscriptController.list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
// if (page != null || size != null) {
// int sizeNo = size == null ? 10 : size.intValue();
// uiModel.addAttribute("transcripts", Transcript.findTranscriptEntries(page == null ? 0 : (page.intValue() - 1) * sizeNo, sizeNo));
// float nrOfPages = (float) Transcript.countTranscripts() / sizeNo;
// uiModel.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages));
// } else {
// uiModel.addAttribute("transcripts", Transcript.findAllTranscripts());
// }
// addDateTimeFormatPatterns(uiModel);
// return "transcripts/list";
// }
@RequestMapping(method = RequestMethod.PUT)
public String TranscriptController.update(@Valid Transcript transcript, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
......
......@@ -12,11 +12,45 @@
<logout logout-url="/resources/j_spring_security_logout"/>
<!-- Configure these elements to secure URIs in your application -->
<intercept-url pattern="/choices/**" access="hasRole('Administrador')"/>
<intercept-url pattern="/choices/**" access="hasAnyRole('Administrador', 'Funcionario')"/>
<intercept-url pattern="/member/**" access="isAuthenticated()" />
<intercept-url pattern="/resources/**" access="permitAll" />
<intercept-url pattern="/atas/**" access="permitAll" />
<intercept-url pattern="/login" access="permitAll" />
<!-- <intercept-url pattern="/index" access="permitAll" /> -->
<!-- <intercept-url pattern="/header**" access="permitAll" /> -->
<!-- <intercept-url pattern="/footer**" access="permitAll" /> -->