smallredville
Programmer
Node Right Permission for users
Technically by using o-script programming, i need to add or update the permissions for some child nodes in livelink.
Now please see the code below which a small part of my function:
if ( privilege == "edit" )
aNewPerms = Assoc.CreateAssoc()
aNewPerms.See = true
aNewPerms.SeeContent = true
aNewPerms.Modify = true
aNewPerms.EditAttr = true
aNewPerms.Create = false
aNewPerms.DeleteVer = false
aNewPerms.Delete = false
iNewPermsMask = $LLIAPI.NodeUtil.PermAssocToMask( aNewPerms )
if dbResult != 0
llnode.NodeRightUpdate (nodeTemp, request.PermType, UserID, aNewPerms ) // If the rightid(UserID) is present already then //it simply will update the permissions column in DtreeACL
else
llnode.NodeRightAdd (nodeTemp, UserID, aNewPerms ) // If the rightid is not present then //it simply will add a new row with rightid(UserID) and the permissions column in DtreeACL
I need to know, to update the node right permission do i need NodeRightUpdate, NodeRightAdd and or wat?
In what condition do i need to use NodeRightADD function under llnode of the module and when shall noderightupdate will be used? Actually here i am bit confused...will my above code will work? I have tried it but my code get failed i think..help me what shall i do?
Note that, i am not giving the permission or access to any user by UI..i need to give this programatically.
Thanks
SRV
Technically by using o-script programming, i need to add or update the permissions for some child nodes in livelink.
Now please see the code below which a small part of my function:
if ( privilege == "edit" )
aNewPerms = Assoc.CreateAssoc()
aNewPerms.See = true
aNewPerms.SeeContent = true
aNewPerms.Modify = true
aNewPerms.EditAttr = true
aNewPerms.Create = false
aNewPerms.DeleteVer = false
aNewPerms.Delete = false
iNewPermsMask = $LLIAPI.NodeUtil.PermAssocToMask( aNewPerms )
if dbResult != 0
llnode.NodeRightUpdate (nodeTemp, request.PermType, UserID, aNewPerms ) // If the rightid(UserID) is present already then //it simply will update the permissions column in DtreeACL
else
llnode.NodeRightAdd (nodeTemp, UserID, aNewPerms ) // If the rightid is not present then //it simply will add a new row with rightid(UserID) and the permissions column in DtreeACL
I need to know, to update the node right permission do i need NodeRightUpdate, NodeRightAdd and or wat?
In what condition do i need to use NodeRightADD function under llnode of the module and when shall noderightupdate will be used? Actually here i am bit confused...will my above code will work? I have tried it but my code get failed i think..help me what shall i do?
Note that, i am not giving the permission or access to any user by UI..i need to give this programatically.
Thanks
SRV