cancel
Showing results for 
Search instead for 
Did you mean: 

addToFolder, removeFromFolder - CMIS

lodopidolo
Champ in-the-making
Champ in-the-making
Hello, I have a doubt about the grants to user addToFolder, removeFromFolder when there more than one user related to the documents.

I have one application space (spaceA) which is owner by one user (userA). I have the same for user B (spaceB, userB). userB can read spaceA. I don't want to copy the docmuments twice but I want they to be accesible by the two spaces.

Example:
1- The application create a document using userA in spaceA called doc1.
2- I excute doc1.addToFolder(spaceB) from userB.
3- I can access to doc1 thought spaceA and spaceB. This is good.
4- I want to remove doc1 from spaceB using userB becuse I just don't want any reference to the document in this space, but I want to maintain it in spaceA (where it was originally created) executing doc1.removeFromFolder(spaceB). ERROR!. I can't to remove it. userB must have Read/Write permission on spaceA to removeFromFolder(spaceB).

I don't know why I must have read/write permission on spaceA to remove something from spaceB. Is this correct?
It could be a security hole if I don't want that userB modify any document from spaceA.

What can I do?

Thanks.
2 REPLIES 2

lodopidolo
Champ in-the-making
Champ in-the-making
Any ideas?

ekirin
Champ in-the-making
Champ in-the-making
I think the source of your problem is https://issues.alfresco.com/jira/browse/ALF-18330

When I call
folder.removeFromFolder(ObjectId)

I get
org.apache.chemistry.opencmis.commons.exceptions.CmisNotSupportedException: Method Not Allowed

it's because of 405 http response.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.