String parentId = aRequest.getParameter("to_content");
if (parentId==null)
throw new SessionExc("initializeSession: parent id not set!");
+ // check if the parent article is published.
+ EntityAdapter article = MirGlobal.localizer().dataModel().adapterModel().makeEntityAdapter("content",
+ DatabaseContent.getInstance().selectById(parentId));
+ if (!MirGlobal.localizer().openPostings().allowArticlePublication((EntityContent)article.getEntity())) {
+ throw new ServletModuleExc("Illegal article");
+ }
+
aSession.setAttribute("to_content", parentId);
}
-}
\ No newline at end of file
+}