cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot navigate to folder when user logs in

doblek
Champ in-the-making
Champ in-the-making
Hi all,

I don't know if this is the appropiate forum, so I apologize if it isn't…

Well, after creating a folder in a store (called personal), my code creates a user and tries to tie the user to the folder created:
    - the folder becomes the home folder for the user
    String home_folder = almacen.getScheme()+"://"+almacen.getAddress()+"/"+folder_ref.getUuid();
    NewUserDetails[] usr_details = new NewUserDetails[]{new NewUserDetails(folder_name,folder_name, createPersonProperties(home_folder,folder_name,"",folder_name+"@asdf.com"))};
    [size=75]where: almacen is the Store object and folder_ref is the Reference object of the folder created in it.[/size]
    - the user has granted all permissions in this folder
    predicate = new Predicate(new Reference[]{folder_ref},null,null);
    ACE[] user_ace = new ACE[]{new ACE(folder_name,Constants.ALL_PERMISSIONS, AccessStatus.acepted)};
    WebServiceFactory.getAccessControlService().addACEs(predicate, user_ace);
    [size=75]In this case, folder name is equal to the username in Alfresco…[/size]

But when I try to log in as the user created, I get the following error:
javax.faces.FacesException: Cannot get value for expression '#{NavigationBean.location}'

caused by:
org.apache.jasper.JasperException: Cannot get value for expression '#{NavigationBean.location}'

caused by:
javax.faces.el.EvaluationException: Cannot get value for expression '#{NavigationBean.location}'

caused by:
javax.faces.el.EvaluationException: org.alfresco.web.bean.NavigationBean

caused by:
javax.faces.el.EvaluationException: Bean: org.alfresco.web.bean.NavigationBean, property: location

caused by:
java.lang.reflect.InvocationTargetException

caused by:
org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/4256538e-733b-11db-a9bd-89febb49b21e

What I see at first sight is that Alfresco is looking for a missing node, since the folder was created in "personal" store (not in SpacesStore):
almacen.getAddress() returns "personal".
So the reference to the node should be:
workspace://personal/4256538e-733b-11db-a9bd-89febb49b21e
How can I tell Alfresco that it should be looking in personal store for the node??

Thanks in advance,
Enrique


PS: Should I ask in "Web Client" forum??
PS2: this is the node identifier for the folder as I see it in the Node Browser
Node Identifier Primary Path: /{user_folder}geronimo 
Reference: workspace://personal/4256538e-733b-11db-a9bd-89febb49b21e
Type: {http://www.alfresco.org/model/content/1.0}folder
Parent: workspace://personal/a0bb0866-6e81-11db-b14b-fbaff357da54 

[…]

Aspects {http://www.alfresco.org/model/content/1.0}auditable
{http://www.alfresco.org/model/system/1.0}referenceable

Permissions Inherit: true

Assigned Permission To Authority Access
All geronimo ALLOWED

[…]
2 REPLIES 2

doblek
Champ in-the-making
Champ in-the-making
The reasons why I cannot navigate to the folder when I log in could be that:
- the folder does not have "uifacets" aspect
- and the folder does not have an "icon" to show
??

If so, does anybody know how to add those features to the folder node via Web Services?

Thanks.

doblek
Champ in-the-making
Champ in-the-making
Hi again,

I've made a test in which I create the folder in the store "SpacesStore" (using the same code) and I was redirected to the appropiate folder after logging in… =/ though folder doesn't have the aspect and icon previously mentioned in my former post…
(I have problems with space locations when creating rules, but that's another matter Smiley Wink )

I've been looking to the code in the jsp pages and it seems that it should be independent from the store in which the folder has been created… It should be enough if the homefolder property has been configured correctly…

What am I doing wrong?? I'm getting mad about it… =/

Thanks,
Enrique

PS: sorry for my English