Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
How to decipher Permission Integer Number
CDMS_Project_Team_Coop_(alcateluser2_-_(deleted))
Hello,I am trying to write a script that will list the permissions on all folders within a given structure. Currently, I get the script to print out the nodeID of the folder, the group or user that has permissions on that folder, and an associated number that represents the permissions for that group/user.Does anyone know how I can turn the number (like 127107) into a text representation (like See, See Contents, Modify)?? I would really appreciate any help here!Thanks a bunch!Nicknicholas.cristello@alcatel.com
Find more posts tagged with
Comments
Geoff_Price_(JTASCAdmin_(Delete)_1422989)
you could create a function (in builder)such as:function getPermissionAsString(integer id) switch id case $PermSEE return "See" end case $PermSeeContents return "See Contents" end end return endif you are using LAPI then you can do the same using thePERM* globals(static class fields for java in LAPI_DOCUMENTS)
eLink User
Message from Alex Kowalenko via eLinkUse bit masks to do it.The key is in deciphering the bit assignments in the binary representationof the numeric permission value: Bits Value Permission--------------------------------- 9 levels--------------------------------- 1 2 See (S)0,12,15 36865 See Contents (SC) 16 65536 Modify (M) 4 16 Edit Permissions (EP) 17 131072 Edit Attributes (EA) 2 4 Add Items (AI) 14 16384 Delete Versions (DV) 3 8 Delete (D) 13 8192 Reserve (R)--------------------------------- Special cases--------------------------------- 7 128 None (N) 0-23 16777215 Administer (A)---------------------------------The total permission value is the sum of individual 9-level permissionvalues plus the None (128) value. For example, 127107 is S,SC,M,DV,R ( 128 +2 + 36865 + 65536 + 16384 + 8192 ). Bit representation examples:------------------------2 1 0321098765432109876543210------------------------000000000000000010000000 = 128 > None000000001001000010000001 = 36993 > SC000000011111000010000011 = 127107 > S,SC,M,DV,R-----Original Message-----From: knowledge@opentext.com [mailto:knowledge@opentext.com]On Behalf OfeLink Discussion: Development DiscussionSent: Tuesday, February 27, 2001 10:37To: eLink RecipientSubject: How to decipher Permission Integer NumberHow to decipher Permission Integer NumberPosted by NewbridgeUser2 on 02/27/2001 10:34 AMHello,I am trying to write a script that will list the permissions on all folderswithin a given structure. Currently, I get the script to print out thenodeID of the folder, the group or user that has permissions on that folder,and an associated number that represents the permissions for thatgroup/user.Does anyone know how I can turn the number (like 127107) into a textrepresentation (like See, See Contents, Modify)?? I would really appreciateany help here!Thanks a bunch!Nicknicholas.cristello@alcatel.com[To reply to this thread, use your normal e-mail reply function.]============================================================Discussion: Development Discussion
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=786303&objAction=viewLivelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exe