@Override public void onUnauthorizedInstantiation(Component component) { if (!AbstractAuthenticatedWebSession.get().isSignedIn()) { // If a component is not authenticated unauthorize it for Rendering. // If the page is properly mounted such that the servlet container will intercept // the request and redirect to login page then authentication will occur normally. // If page is not mounted properly ie mount path does not match a security-constraint // then unauthorized page will be returned. MetaDataRoleAuthorizationStrategy.unauthorizeAll(component, Component.RENDER); } else { //Use Default implementation if authenticated. ServletContainerAuthenticatedWebApplication.this.onUnauthorizedInstantiation(component); } } }
MetaDataRoleAuthorizationStrategy.authorizeAll(addAjaxLink, RENDER); } else { MetaDataRoleAuthorizationStrategy.unauthorizeAll(addAjaxLink, RENDER);
MetaDataRoleAuthorizationStrategy.authorizeAll(actionLink, RENDER); } else { MetaDataRoleAuthorizationStrategy.unauthorizeAll(actionLink, RENDER);