public boolean checkAccess(RequestContext context, String action) { ContentPage page = context.getPage(); String path = page.getPath(); if (path == null) return false; if (path.indexOf(Folder.ROLE_FOLDER) > -1 || path.indexOf(Folder.GROUP_FOLDER) > -1) { if (action.equals(JetspeedActions.VIEW)) return true; return false; } return true; }
public boolean isPageQualifiedForCreateNewPageOnEdit(RequestContext context) { if ( ! this.enableCreateUserPagesFromRolesOnEdit || context == null ) return false ; return isPageQualifiedForCreateNewPageOnEdit( context.getPage().getPath() ); }
public boolean checkAccess(RequestContext context, String action) { ContentPage page = context.getPage(); try { page.checkAccess(action); } catch (Exception e) { Principal principal = context.getRequest().getUserPrincipal(); String userName = this.guest; if (principal != null) userName = principal.getName(); log.warn("Insufficient access to page " + page.getPath() + " by user " + userName); return false; } return true; } }
log.debug("Page path: "+requestPage.getPath());
log.info("Aggregating " + page.getPath() + ". Parallel: " + parallelJobCount + ", Sequential: " + sequentialJobCount);
public boolean createNewPageOnEdit(RequestContext context) { if ( ! this.enableCreateUserPagesFromRolesOnEdit ) return false ; ContentPage contentPage = context.getPage(); String pagePath = contentPage.getPath(); try { if ( isPageQualifiedForCreateNewPageOnEdit( pagePath ) ) { // create user home pages String pageName = contentPage.getName(); pageManager.createUserHomePagesFromRoles(context.getSubject()); // update request context with new profiler valve invocation pageLocatingValve.invoke(context, null); } } catch (Exception e) { // already logged error return false; } return true; } }
public ContentPageBean(final ContentPage contentPage) { id = contentPage.getId(); name = contentPage.getName(); path = contentPage.getPath(); title = contentPage.getTitle(); shortTitle = contentPage.getShortTitle(); url = contentPage.getUrl(); skin = contentPage.getSkin(); ContentFragment rootFragment = contentPage.getRootFragment(); if (rootFragment != null) { rootFragmentBean = new ContentFragmentBean(rootFragment); } }