mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
. Fix to external access URLs to correctly navigate to specified NodeRef and setup Breadcrumb component etc.
. Tidy up of web-client authentication code git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2231 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -389,17 +389,24 @@ public class NavigationBean
|
||||
{
|
||||
if (this.location == null)
|
||||
{
|
||||
// init the location from the User object for the first time
|
||||
User user = Application.getCurrentUser(FacesContext.getCurrentInstance());
|
||||
|
||||
NodeRef homeSpaceRef = new NodeRef(Repository.getStoreRef(), user.getHomeSpaceId());
|
||||
String homeSpaceName = Repository.getNameForNode(this.nodeService, homeSpaceRef);
|
||||
|
||||
// set the current node to the users Home Space Id
|
||||
setCurrentNodeId(user.getHomeSpaceId());
|
||||
|
||||
// setup the breadcrumb with the same location
|
||||
// set the current node to the users Home Space Id if one has not already been set
|
||||
NodeRef homeSpaceRef;
|
||||
List<IBreadcrumbHandler> elements = new ArrayList<IBreadcrumbHandler>(1);
|
||||
if (getCurrentNodeId() == null)
|
||||
{
|
||||
User user = Application.getCurrentUser(FacesContext.getCurrentInstance());
|
||||
homeSpaceRef = new NodeRef(Repository.getStoreRef(), user.getHomeSpaceId());
|
||||
}
|
||||
else
|
||||
{
|
||||
homeSpaceRef = new NodeRef(Repository.getStoreRef(), getCurrentNodeId());
|
||||
}
|
||||
|
||||
// set initial node ID
|
||||
setCurrentNodeId(homeSpaceRef.getId());
|
||||
|
||||
// setup the breadcrumb with the same initial location
|
||||
String homeSpaceName = Repository.getNameForNode(this.nodeService, homeSpaceRef);
|
||||
elements.add(new NavigationBreadcrumbHandler(homeSpaceRef, homeSpaceName));
|
||||
setLocation(elements);
|
||||
}
|
||||
|
Reference in New Issue
Block a user