docs: private CmsObject initCmsObject(CmsContextInfo contextInfo) throws CmsException {
  
          CmsUser user = contextInfo.getUser();
          if (user == null) {
              user = m_securityManager.readUser(null, contextInfo.getUserName());
          }
  
          CmsProject project = contextInfo.getProject();
          if (project == null) {
              project = m_securityManager.readProject(contextInfo.getProjectName());
          }
  
          // first create the request context
          CmsRequestContext context = new CmsRequestContext(
              user,
              project,
              contextInfo.getRequestedUri(),
              contextInfo.getRequestMatcher(),
              contextInfo.getSiteRoot(),
              contextInfo.isSecureRequest(),
              contextInfo.getLocale(),
              contextInfo.getEncoding(),
              contextInfo.getRemoteAddr(),
              contextInfo.getRequestTime(),
              m_resourceManager.getFolderTranslator(),
              m_resourceManager.getFileTranslator(),
              contextInfo.getOuFqn());
          context.setDetailResource(contextInfo.getDetailResource());
  
          // now initialize and return the CmsObject
          return new CmsObject(m_securityManager, context);
      }