Change Owner

13 views
Skip to first unread message

Rajagopal Geethu

unread,
Nov 30, 2016, 12:38:08 PM11/30/16
to Alfresco Technical Discussion
How does one change the owner of the document which is uploaded to a particular folder automatically? This requirement is there as the uploaded document goes through an approval process and moved to another folder where the uploader of the document is only a consumer. As it stands,since the uploader is the creator the user is able to delete it. 

Douglas C. R. Paes

unread,
Nov 30, 2016, 6:31:53 PM11/30/16
to alfresco-techn...@googlegroups.com
You can do that by using a javascript file or a behaviour.

In Javascript, something like this:

var props = new Array(1);
props["cm:owner"] = "admin";
document.addAspect("cm:ownable", props);

In Java, you can use the OwnableService, as follow:

ownableService.setOwner(nodeRef, "user");

Em qua, 30 de nov de 2016 às 15:38, Rajagopal Geethu <tal...@gmail.com> escreveu:
How does one change the owner of the document which is uploaded to a particular folder automatically? This requirement is there as the uploaded document goes through an approval process and moved to another folder where the uploader of the document is only a consumer. As it stands,since the uploader is the creator the user is able to delete it. 

--
You received this message because you are subscribed to the Google Groups "Alfresco Technical Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alfresco-technical-d...@googlegroups.com.
To post to this group, send email to alfresco-techn...@googlegroups.com.
Visit this group at https://groups.google.com/group/alfresco-technical-discussion.
For more options, visit https://groups.google.com/d/optout.
--

Douglas C. R. Paes

Reply all
Reply to author
Forward
0 new messages