/**
  * Author: Felipe Date: 03/04/2016 Creates the.
  *
  * @param model the model
  * @return the string
  */
 @RequestMapping("/new")
 public String create(Model model) {
   model.addAttribute("article", new Article());
   model.addAttribute("author", userService.list());
   model.addAttribute("readonly", false);
   return "/article/new";
 }
  /**
   * Author: Luciane Date: 24/03/2016 Description: Change view to read
   * by @RequestMapping("/view/{slug}").
   *
   * @param model
   * @return
   */
  @RequestMapping("/view/{slug}")
  public String view(@PathVariable String slug, Model model) {

    Article article = articleService.get(slug);
    Comment comment = new Comment();
    comment.setDocument(article);

    model.addAttribute("auth", userService.getPrincipal() != null);
    model.addAttribute("article", article);
    model.addAttribute("comment", comment);
    return "/article/view";
  }
 @RequestMapping("/viewAuth")
 public String viewAuth(Model model) {
   model.addAttribute("auth", userService.getPrincipal() != null);
   return "/article/view";
 }