| From: | Villanueva, Antonio <antonio.villanueva@goodrich.com> |
| To: | solutions@lists.ptcuser.org |
| Subject: | [solutions] - Tip on loading ACLs via CSV file |
| Date: | Thu, 30 Oct 2008 10:11:33 -0400 |
In case you need to try this it’s a very easy way to make ACL changes to many product areas. If you have to a lot of changes, it is much easier than the Policy administrator. Note: The load file can only add ACL entries, not remove.
CSV entry
AccessFile, user(optional), domain path, object type, permission (+ or -), principal (LDAP PATH), permissions, state name
example
|
AccessRule |
|
/Default |
WCTYPE|wt.doc.WTDocument|com.goodrich.eos.General |
+ |
cn=CONFIRMED@cn=otherGroups@cn=accessGroups@ cn=<productname>@ cn=wt.pdmlink.PDMLinkProduct@ o=<org>@ ou=people@ cn=pdmlink@ cn=Application Services@ o=<company> |
0/2/1 |
INWORK |
OWNER and ALL can be called out just like that since they are not an LDAP Path
Permission numbers should be entered delimited by forward slashes. You can get the numbers from wt.access.AccessPermissionRB.rbInfo resource bundle
User is optional and I ignore it.
For hard class types, just put the full classpath like wt.doc.WTDocument. For soft types, prefix as above with WCTYPE and use the logical or external identifier to specify the doc type as displayed in the Type Manager.
Make sure to replace commas in the CSV file before converting it to XML (like @). I drop the CSV file in the src/loadFiles folder and run “windchill wt.load.util.CSV2XML”. Open the resulting XML file and convert the comma replacement character (@) back to commas and save.
Post file to the server and run to each product context. Remember in the example above, the LDAP path included the product name. Once you have one file done, you should only need to replace the product name in the XML file to make a load file for the next product area.
bash-3.00$ /pdmlink/ptc/Windchill/bin/windchill wt.load.LoadFromFile -u <username> -p <password> -d <yourfile>.xml -CONT_PATH \"/wt.inf.container.OrgContainer=<org name>/wt.pdmlink.PDMLinkProduct=<product name>\"