@RequestMapping(value="/authorized", method=RequestMethod.GET)
public @ResponseBody Map<String, Object> isAuthorized(
@RequestParam String target, HttpSession session) {
Long userId = (Long) session.getAttribute(AttributeKeys.USER_ID_KEY);
Authorization authorization = authorizationService.getAuthorization(target, userId);
//
Map<String, Object> model = CollectionUtil.newHashMap();
model.put("authorized", authorization!=null);
return model;
}