|
From: Wolfgang L. <w_l...@us...> - 2004-09-12 13:30:09
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/portal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8466/src/org/cobricks/portal Modified Files: PortalManagerImpl.java Log Message: Removed access rights check from portal pages since it does not yet work. Index: PortalManagerImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalManagerImpl.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- PortalManagerImpl.java 12 Sep 2004 12:31:04 -0000 1.26 +++ PortalManagerImpl.java 12 Sep 2004 13:30:00 -0000 1.27 @@ -194,7 +194,6 @@ if (pagePath == null) pagePath = "/"; if (pageName == null) pageName = "index.html"; PortalPage p = pageCache.getPage(pagePath, pageName); - p = null; // deactivate cache if (p == null) { int itemid = getPageItemId(pagePath, pageName); if (itemid > 0) { @@ -224,9 +223,6 @@ { if (itemid < 1) return null; PortalPage p = pageCache.getPage(itemid); - - p = null; // deactivate cache - if (p == null) { // load data from database p = loadPageFromDatabase(itemid); @@ -250,9 +246,12 @@ logger.warn("Item class of portal page is "+o.getClass().getName()); return null; } + logger.info("Portal Page loaded."); PortalPage result = (PortalPage)o; // explicitly set content + logger.info("Initialising content."); result.initContent(); + logger.info("Content initialised."); return result; } catch (Exception e) { logger.warn(LogUtil.ex("Failed loading PortalPage object", e)); @@ -367,15 +366,18 @@ String lang = portalRequest.getLang(); PortalPage page = getPage(pagePath, pageName); - - // check access rights + + // check access rights - does not work yet + + /* if (!checkAccessPermission(page, portalRequest.getPortalUser(), "read")) { pagePath = "/"; pageName = "noaccess.html"; page = getPage(pagePath, pageName); } - + */ + // get page content Map pc = page.getStringContent(lang); if (pc == null || pc.size()<1) { @@ -409,7 +411,7 @@ portalRequest.setPageLang(pageLang); try { // parse Velocity template - Velocity.evaluate(portalRequest.getVelocityContext(), out, + Velocity.evaluate(portalRequest.getVelocityContext(), out, pageName, pageContent); } catch (ParseErrorException epe) { // syntax error - failed parsing the template |