mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. Fix to JbossPortal case to handle web-client startup changes from last checkin
- Guest and others can correctly navigate to MyAlfresco on login git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3655 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -33,6 +33,7 @@ import javax.portlet.RenderRequest;
|
||||
import javax.portlet.RenderResponse;
|
||||
import javax.portlet.UnavailableException;
|
||||
|
||||
import org.alfresco.config.ConfigService;
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||
import org.alfresco.service.cmr.security.AuthenticationService;
|
||||
@@ -43,7 +44,9 @@ import org.alfresco.web.app.servlet.AuthenticationStatus;
|
||||
import org.alfresco.web.bean.ErrorBean;
|
||||
import org.alfresco.web.bean.FileUploadBean;
|
||||
import org.alfresco.web.bean.LoginBean;
|
||||
import org.alfresco.web.bean.NavigationBean;
|
||||
import org.alfresco.web.bean.repository.User;
|
||||
import org.alfresco.web.config.ClientConfigElement;
|
||||
import org.apache.commons.fileupload.FileItem;
|
||||
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
|
||||
import org.apache.commons.fileupload.portlet.PortletFileUpload;
|
||||
@@ -259,8 +262,19 @@ public class AlfrescoFacesPortlet extends MyFacesGenericPortlet
|
||||
// perform the forward to the page processed by the Faces servlet
|
||||
response.setContentType("text/html");
|
||||
request.getPortletSession().setAttribute(PortletUtil.PORTLET_REQUEST_FLAG, "true");
|
||||
|
||||
// get the start location as configured by the web-client config
|
||||
ConfigService configService = (ConfigService)ctx.getBean("webClientConfigService");
|
||||
ClientConfigElement configElement = (ClientConfigElement)configService.getGlobalConfig().getConfigElement("client");
|
||||
if (NavigationBean.LOCATION_MYALFRESCO.equals(configElement.getInitialLocation()))
|
||||
{
|
||||
nonFacesRequest(request, response, "/jsp/dashboards/container.jsp");
|
||||
}
|
||||
else
|
||||
{
|
||||
nonFacesRequest(request, response, "/jsp/browse/browse.jsp");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
|
@@ -260,6 +260,15 @@ public class NavigationBean
|
||||
}
|
||||
else if (LOCATION_MYALFRESCO.equals(location))
|
||||
{
|
||||
// make sure we set a current node ID as some screens expect this
|
||||
if (getCurrentNodeId() == null)
|
||||
{
|
||||
String homeSpaceId = Application.getCurrentUser(context).getHomeSpaceId();
|
||||
NodeRef homeSpaceRef = new NodeRef(Repository.getStoreRef(), homeSpaceId);
|
||||
setCurrentNodeId(homeSpaceRef.getId());
|
||||
}
|
||||
|
||||
// create a breadcrumb handler for this special case location (not a node)
|
||||
List<IBreadcrumbHandler> elements = new ArrayList<IBreadcrumbHandler>(1);
|
||||
elements.add(new IBreadcrumbHandler()
|
||||
{
|
||||
|
Reference in New Issue
Block a user