-// Node submissions = JcrUtils.mkdirs(session,
-// "/" + EntityType.form.get() + "/" + EntityNames.SUBMISSIONS_BASE);
- CmsSession cmsSession = RemoteAuthUtils.getCmsSession(request);
-
-// ClassLoader currentContextCl = Thread.currentThread().getContextClassLoader();
-// Thread.currentThread().setContextClassLoader(CmsJcrUtils.class.getClassLoader());
- Session adminSession = null;
- try {
- // TODO centralise at a deeper level
- adminSession = CmsJcrUtils.openDataAdminSession(repository, null);
- SuiteUtils.getOrCreateCmsSessionNode(adminSession, cmsSession);
- } finally {
- Jcr.logout(adminSession);
-// Thread.currentThread().setContextClassLoader(currentContextCl);
- }
-
- Node cmsSessionNode = SuiteUtils.getCmsSessionNode(session, cmsSession);
+ Content sessionDir = appUserState.getOrCreateSessionDir(cmsSession);
+ Node cmsSessionNode = sessionDir.adapt(Node.class);
+ // Node cmsSessionNode = SuiteJcrUtils.getCmsSessionNode(session, cmsSession);