I'd like to add some custom code so that when a user creates a new folder in the Enterprise workspace, the owner id (dtree.UserID) value is always set to a dummy account which no one uses. We need this feature because we don't want any individual user to have "forever" access to an object even if she moves to a completely different department and should no longer have access to her old department's information.
I tried this code:
/*** call a function to get the unique ID of "DefaultOwner" user account ***/
result = $CPSBase.CPSFunctions.getDefaultOwnerID(createInfo)
if node.pVolumeID == -2000
node.pUserID = result.ID
end
status = DAPI.updateNode(node)
but I'm getting this error returned from the Dapi function: "Control accessibility error. Not enough permissions."
The user has ACL permissions in the parent folder of : "see/see contents/modify/editattributes/additems/reserve/deleteversions".
Can anyone shed some light on why the dapi call is failing? Surely all the permissions above should be enough to do a simple ownerid change during the create process.