@RequestMapping("/user/{id}") public String whois(@PathVariable int id, Model model) throws NothingWasFoundException, SQLException { model.addAttribute("user", users.get(id)); model.addAttribute("roles", users.getCurrentUserRoles()); return "whois"; }
@Secured({"ROLE_USER", "ROLE_MODERATOR", "ROLE_ADMINISTRATOR"}) @RequestMapping("/me") public String me(Model model) throws NothingWasFoundException, SQLException, NotLoggedInException { model.addAttribute("user", users.getCurrentUser()); model.addAttribute("roles", users.getCurrentUserRoles()); return "me"; }
@RequestMapping("/login") public String login(Model model, @RequestParam(required = false) Map<String, String> params) { model.addAttribute("haserror", params.containsKey("error")); model.addAttribute("roles", users.getCurrentUserRoles()); return "login"; }