docs: protected void initCmsContextForUI(HttpServletRequest req, HttpServletResponse res, CmsUIServlet servlet)
      throws IOException, CmsException {
  
          // instantiate CMS context
          String originalEncoding = req.getCharacterEncoding();
          String referrer = req.getHeader("referer");
          boolean allowPrivilegedLogin = (referrer == null) || !referrer.contains(CmsWorkplaceLoginHandler.LOGIN_HANDLER);
  
          CmsObject cms = initCmsObject(req, res, allowPrivilegedLogin);
          servlet.setCms(cms);
          if (originalEncoding != null) {
              // getI18NInfo sets wrong encoding
              req.setCharacterEncoding(originalEncoding);
          }
      }