function boolean canCreate(Object prgCtx,DAPINode container,Integer subType) Boolean retVal=false // does the user have rights to CREATE objects in the specified container ? Boolean containerPermissionsOK=$LLIAPI.NodeUtil.CheckPermissions(container,{$PCreateNode}) // does the user have the privelidge to create an Object of the specified SubType (based on ?func=admin.adminfactories) Boolean createSubTypePrivOK=$LLIAPI.FactoryUtil.IsCreatable(prgCtx,subType) // AND the two booleans to produce the overall result retVal=(containerPermissionsOK && createSubTypePrivOK) // return the result return retVal endThe prgCtx can either be the current user's, or another's such as Admin. The container parameter is the Livelink Object in which you would like to create the new Node, e.g. a Folder, Project, Compound Document, Case etc. The final parameter subType is the Livelink Sub Type of the Node you are trying to create - see the Content Server / Livelink SubType list for more information on the different SubType's available in Content Server / Livelink, although this will be dependant on which modules you have installed.
Thus to use this to see if the current user can create a Folder, for which we will use the OScript constant $TypeFolder, in a Livelink container which has a DAPINode of containerDAPINode, we could use the following :
Boolean userCanCreateFolderInNode=canCreate(prgCtx,containerDAPINode,$TypeFolder)