mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.1 to V2.0
6435: AR-1644 Web Scripts do not provide any control over caching 6469: Replaced EUPL licence with standard license header 6526: AR-1685 Error creating workflow with no document associated 6565: Fix for issue with file Upload in main web-client portlet for JBoss/Liferay portal integration. 6578: AR-1620: Upgraded One-Jar to 0.96-RC4 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6581 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -74,6 +74,7 @@ import org.springframework.web.context.WebApplicationContext;
|
||||
public class AlfrescoFacesPortlet extends MyFacesGenericPortlet
|
||||
{
|
||||
private static final String PREF_ALF_USERNAME = "_alfUserName";
|
||||
private static final String SESSION_LAST_VIEW_ID = "_alfLastViewId";
|
||||
|
||||
private static final String ERROR_PAGE_PARAM = "error-page";
|
||||
private static final String ERROR_OCCURRED = "error-occurred";
|
||||
@@ -151,11 +152,13 @@ public class AlfrescoFacesPortlet extends MyFacesGenericPortlet
|
||||
}
|
||||
}
|
||||
|
||||
// it doesn't matter what the value is we just need the VIEW_ID parameter
|
||||
// to tell the faces portlet bridge to treat the request as a JSF request,
|
||||
// this will send us back to the same page we came from, which is fine for
|
||||
// most scenarios.
|
||||
response.setRenderParameter(VIEW_ID, "a-jsf-page");
|
||||
// Set the VIEW_ID parameter to tell the faces portlet bridge to treat the request
|
||||
// as a JSF request, this will send us back to the previous page we came from.
|
||||
String lastViewId = (String)request.getPortletSession().getAttribute(SESSION_LAST_VIEW_ID);
|
||||
if (lastViewId != null)
|
||||
{
|
||||
response.setRenderParameter(VIEW_ID, lastViewId);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -262,6 +265,8 @@ public class AlfrescoFacesPortlet extends MyFacesGenericPortlet
|
||||
// use the viewId to check that we are not already on the login page
|
||||
PortletSession session = request.getPortletSession();
|
||||
String viewId = request.getParameter(VIEW_ID);
|
||||
// keep track of last view id so we can use it as return page from multi-part requests
|
||||
request.getPortletSession().setAttribute(SESSION_LAST_VIEW_ID, viewId);
|
||||
User user = (User)request.getPortletSession().getAttribute(AuthenticationHelper.AUTHENTICATION_USER);
|
||||
if (user == null && (viewId == null || viewId.equals(getLoginPage()) == false))
|
||||
{
|
||||
|
Reference in New Issue
Block a user