boolean hasEditAccess = false;
try {
RequestContext requestContext = (RequestContext) request.getAttribute(RequestContext.REQUEST_PORTALENV);
ContentPage contentPage = requestContext.getPage();
contentPage.checkAccess(JetspeedActions.EDIT);
hasEditAccess = true;
} catch (Exception ignore) {
}
request.setAttribute("editAccess", hasEditAccess ? Boolean.TRUE : Boolean.FALSE);