cancel
Showing results for 
Search instead for 
Did you mean: 

Grant Ownership

stefan776
Champ on-the-rise
Champ on-the-rise
I am running into the problem of reassigning ownership of spaces and content via the Web Client.
While this is possible via Alfresco's APIs, the UI does not provide this capability.
My current workaround is to remove the "read-only"-attribute from the property sheet of the "cmSmiley Surprisedwnable" aspect in  "/alfresco/WEB-INF/classes/alfresco/web-client-config-properties.xml"

Like so:


   <config evaluator="aspect-name" condition="cm:ownable">
      <property-sheet>
         <show-property name="cm:owner"/>
      </property-sheet>
   </config>

This will at least make the "Owner" field writable in the View Details > Modify Properties form.

Naturally, this is less than optimal.
I was wondering if someone has thought of a better solution to this problem. Maybe a custom action might do the trick?
IMO, the ideal solution would be enhance the "Invite" dialogue of the "Manage Space/Content users" action with an "assign new owner" option.
Anyway, I'd appreciate any insight into or ideas regarding the matter.
Thanks,
- Stefan
2 REPLIES 2

alessandromiazo
Champ in-the-making
Champ in-the-making
I'm facing the same issue, and i have tried what you have done..But no result
i'd like to change the ownorship of different files files..How did you do to make the field owner editable?
Could you please tell me more about what you have done exactly??

Thanks in Advance

sujaypillai
Confirmed Champ
Confirmed Champ
Hello Stefan,

I could achieve that using a Webscript.
Below is the js code:
function main() {

        //Assuming that the space is under Company Home
   var spaceName = url.templateArgs['spaceName'];
          
        var spaceNode = companyhome.childByNamePath(spaceName);

        logger.log(">>>>> Space Node  : " + spaceNode );
   logger.log(">>>>> Space Owner : " + spaceNode.getOwner() );
   spaceNode.setOwner('requiredUserName');
   logger.log(">>>>> Space Owner after setting : " + spaceNode.getOwner() );
   
}

main();

I created a space under Company Home and wrote a WS which takes the 'SpaceName' as argument.

Hope so that helps you.

Let me try this with a 'Custom Action'.