Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add item permission in oscript

Status
Not open for further replies.

cdfly

Programmer
Jun 16, 2010
68
US
Hello,
I'm new to Livelink and I need to be able to set a permission on a folder to "Add items" in oscript. Is there a constant for that? I've noticed others like $PSee and $PSeeContents, would Add items be something like $PAddItems ?

Thanks
 
You can use these with the $P
Object Permission Constants

The following permission constants define the operations users who have that permission can perform on an object.

PERM_CHECKOUT // can modify an object's versions (and therefore check out the object)
PERM_CREATENODE // can add children to the object
PERM_DELETE // can delete the object
PERM_DELETEVERSIONS // can delete versions of an object
PERM_EDITATTS // can edit the object's category and attributes
PERM_EDITPERMS // can edit the object's permission set
PERM_MODIFY // can modify an object's characteristics (for example, rename
the object)
PERM_REMOVENODE // can delete child objects; this permission must be
included with all objects for Livelink to operate properly
PERM_SEE // can see the object
PERM_SEECONTENTS // can see the contents (child objects and/or data) of an object
PERM_FULL // all permission granted

Just sustitute for example $PSEE is PERM_SEE.In the builder inspector window if you do $PCREATENODE you will get bitmask 4

However the trick is a little hard to explain to a new programmer.The bitmasks are added/subtracted using oscript bit arithmetic you will see things like $PSee<$PSEECONTENTS etc in code which means that I have added those two bits togethrs.Also oscript allows /temms you which bits are 'SET' in a integer.

It is fun and I love bitmasking..

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008
 
So there is really no $PAddItems constant. So would I have to set the permissions the same way they look for the access's for an object in Livelink:
$PSee + $PSeeContents+$PModify+$PCREATENODE

Thanks again

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top