Fix for AWC-488 - when a permissions "access is denied" occurs for content/externalaccess/template URL then the login page is now shown

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2290 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-02-03 10:56:47 +00:00
parent da914e0549
commit 2c8233db84
7 changed files with 111 additions and 37 deletions

View File

@@ -38,7 +38,6 @@ import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.security.AuthenticationService;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.service.cmr.security.PersonService;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.web.app.Application;
import org.alfresco.web.app.portlet.AlfrescoFacesPortlet;
import org.alfresco.web.bean.LoginBean;
@@ -63,8 +62,6 @@ import org.springframework.web.context.support.WebApplicationContextUtils;
*/
public final class AuthenticationHelper
{
public static final String FACES_SERVLET = "/faces";
/** session variables */
public static final String AUTHENTICATION_USER = "_alfAuthTicket";
public static final String SESSION_USERNAME = "_alfLastUser";
@@ -194,9 +191,7 @@ public final class AuthenticationHelper
}
}
// no user/ticket found or session invalidated by user (logout) - redirect to login page
httpResponse.sendRedirect(httpRequest.getContextPath() + FACES_SERVLET + Application.getLoginPage(context));
// session invalidated - return to login screen
return AuthenticationStatus.Failure;
}
else
@@ -207,8 +202,7 @@ public final class AuthenticationHelper
}
catch (AuthenticationException authErr)
{
// expired ticket - redirect to login page
httpResponse.sendRedirect(httpRequest.getContextPath() + FACES_SERVLET + Application.getLoginPage(context));
// expired ticket
return AuthenticationStatus.Failure;
}