0
votes

When I log in as normal user and call:

Folder rootFolder = (Folder) cmisSession.getObject(parentFolderId);
rootFolder.getPath(); //THIS LINE GIVE ME THE ERROR

on a folder, I get this error:

org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Repository didn't return cmis:path!

rootFolder seems valid and it is not null.

But if instead of using a generic user, I use the admin user, all works fine. No errors.

I suppose that the folder has the right authorization (otherwise I will receive an cmis authorization exception). I created the folder from the admin control panel, and granted authorization to a group which my user belong.

To call getPath() I'm using the library: chemistry-opencmis-client-impl-0.10.0.jar

Edit1 09:45: The objects: screenshot

Edit2 09:58: If I assign to the group the Manager role, the getPath() method works fine. (With the role: consumer, contributor and collaborator it doesn't work as usual).

Edit3 12:19 07/07/2018: Some other configuration:

The directory (I tried to grant to group the manager role for the directory, but it doesn't work): the directory

The user configuration (if in site manager I grant the Manager role to the user it works): The user configuration

The group configuration from site manager (if I grant the Manager role to the group it works): The group configuration from site manager

What am I missing?

2
Are you able to put a breakpoint on this line specifically to see the object ? - Akah
@Akah yes, I edited the post - Accollativo

2 Answers

3
votes

Most likely your "generic" user does not have permissions on something in the hierarchy tree. This is relevant because path is not metadata stored in database, it's basically "calculated" when you ask for it.

While going up the hierarchy path you most likely end up on a node you don't have permissions for.

0
votes

The group was added automatically through LDAP, and if you searched it under Users and Groups -> Group you could find it. But in the Site manager panel was not present. So adding it from Site manager solved my problem.