@RequestMapping(value = "/create")
  public String createLanguage(HttpServletRequest request, Model model) {
    PageContext PC = PageContext.newInstance(request, model);
    UserSecurity me = PC.getUser();
    AccessManager manager;

    if (me == null || (manager = me.getAccessManager()) == null || !manager.has("LANGUAGE", "ADD"))
      PC.addError(AccessErrors._NAME, AccessErrors.NOT_HAS_PERMISSIONS);

    PC.initPage("Создание языка", null, null);

    if (!PC.hasError()) {
      model.addAttribute("language", new Language());
      PC.setView("languages", "createEdit");
    } else PC.setView("main", "access");

    return PC.render(PageContext.RENDER_BACKEND);
  }
  @RequestMapping
  public String getLanguageList(HttpServletRequest request, Model model) {
    PageContext PC = PageContext.newInstance(request, model);
    UserSecurity me = PC.getUser();
    AccessManager manager;

    if (me == null || (manager = me.getAccessManager()) == null || !manager.hasAny("LANGUAGE"))
      PC.addError(AccessErrors._NAME, AccessErrors.NOT_HAS_PERMISSIONS);

    PC.initPage("Управление языками", null, null);

    if (!PC.hasError()) {
      model.addAttribute("languages", Languages.getLanguages());
      PC.setView("languages", "list");
    } else PC.setView("main", "access");

    return PC.render(PageContext.RENDER_BACKEND);
  }