cancel
Showing results for 
Search instead for 
Did you mean: 

moving content to other folder without becoming a contributor

e-no91
Champ in-the-making
Champ in-the-making
Is it possible for a user to upload a document in folder A, then I set rule to move the document to folder B, where the user have no access to the document at all?
Because so far the only way to move the file is to have the user as contributor in both folders, meaning that the user can direct upload to any folders, something that I don't want.
2 REPLIES 2

openpj
Elite Collaborator
Elite Collaborator
You could implement the sudo feature and use it in a rule to move the content from a space with specific permissions to another one.

The implementation is based on an extension of Mozilla Rhino that is the framework used by the Alfresco JavaScript API to expose Java services using ECMAScript. So the best way is to expose in ECMAScript the new service using a new JavaScript variable mapped with a Java service.

In this way you can execute the move action using a different user, allowed to write content in the space B and then you could re-sudo the context to the starting user for all the other operations that must be executed with the normal context.

You can follow this post to understand how to expose the sudo feature in the Alfresco JavaScript API and then you can use it in a rule:
http://fabiostrozzi.eu/2009/11/23/sudo-like-tool-for-alfresco-webscripts/

Hope this helps Smiley Happy

e-no91
Champ in-the-making
Champ in-the-making
Hi, thanks for the reply!
That looks like something I wanted to do!
But where do I put the Sudo.java file? And is there any other thing I have to install?