@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
  public @ResponseBody Map<String, Object> delete(@PathVariable("id") long id) {
    String username = SecurityContextHolder.getContext().getAuthentication().getName();
    Map<String, Object> map = new HashMap<>();
    if (authService.delete(authService.getById(id), username)) {
      map.put("msg", true);
    } else {
      map.put("msn", false);
    }

    return map;
  }
 @RequestMapping(value = "/init-update/{id}", method = RequestMethod.GET)
 public String initUpdate(@PathVariable long id, Model model) {
   model.addAttribute("authority", authService.getById(id));
   model.addAttribute("listResources", authService.getListResources());
   return "authority/update";
 }