+ /**
+ * @return the core
+ */
+ public Core getCore() {
+ return core;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void processTemplate(TemplateContext templateContext, ServletRequest request) throws RedirectException {
+ super.processTemplate(templateContext, request);
+ User currentUser = (User) request.getServletRequest().getSession().getAttribute("currentUser");
+ templateContext.set("currentUser", currentUser);
+ templateContext.set("core", getCore());
+ templateContext.set("dataManager", getCore().getDataManager());
+ int requiredUserLevel = getRequiredUserLevel();
+ if (((currentUser == null) && (requiredUserLevel > 0)) || ((currentUser != null) && (requiredUserLevel > currentUser.getLevel()))) {
+ throw new RedirectException("login");
+ }
+ }