I am trying to generate a list of access rights of all the modules within a database. Module2 | /path2 | User 1 | RMC | User 2 | RMCDA | User n | R Module3 | /path3 | User 1 | R | User 2 | R | User n | R Just checking if anyone has done something like this or similar using dxl scripts? Thanks, Parin Parin - Mon Jan 03 19:52:56 EST 2011 |
Re: List access rights to all modules in a database using dxl
Like that ? // Report Access Rights on All Items /* This script loops through all Items ( Projects, Folders, and Modules ) below the current folder or project, and reports on Access Rights. It does not attempt to open Modules and get any Access Right information from inside the Modules. You can add your own checks for the specific Access Rights you are looking for, and update the output of the script accordingly. Tony Goodman. */ void recurseFolders( Item parentItem ) { string itemType = type( parentItem ) if ( ( itemType == "Folder" ) || ( itemType == "Project" ) ) { Item childItem for childItem in folder( parentItem ) do { recurseFolders( childItem ) } } print itemType ":\t" print fullName( parentItem ) "\t" uniqueID( parentItem ) "\n" AccessRec ar for ar in all parentItem do { if ( isDefault( ar ) ) { print "\tDefault" } else { print "\t" username( ar ) } print " (" string r = ((read ar) ? "R" : "") string m = ((modify ar) ? "M" : "") string c = ((create ar) ? "C" : "") string d = ((delete ar) ? "D" : "") string a = ((control ar) ? "A" : "") string accessStr = r m c d a "" if ( null accessStr ) accessStr = "None" print accessStr print ")" print "\n" } } recurseFolders(item(fullName current Folder))
|
Re: List access rights to all modules in a database using dxl PDU - Tue Jan 04 01:11:55 EST 2011
Like that ? // Report Access Rights on All Items /* This script loops through all Items ( Projects, Folders, and Modules ) below the current folder or project, and reports on Access Rights. It does not attempt to open Modules and get any Access Right information from inside the Modules. You can add your own checks for the specific Access Rights you are looking for, and update the output of the script accordingly. Tony Goodman. */ void recurseFolders( Item parentItem ) { string itemType = type( parentItem ) if ( ( itemType == "Folder" ) || ( itemType == "Project" ) ) { Item childItem for childItem in folder( parentItem ) do { recurseFolders( childItem ) } } print itemType ":\t" print fullName( parentItem ) "\t" uniqueID( parentItem ) "\n" AccessRec ar for ar in all parentItem do { if ( isDefault( ar ) ) { print "\tDefault" } else { print "\t" username( ar ) } print " (" string r = ((read ar) ? "R" : "") string m = ((modify ar) ? "M" : "") string c = ((create ar) ? "C" : "") string d = ((delete ar) ? "D" : "") string a = ((control ar) ? "A" : "") string accessStr = r m c d a "" if ( null accessStr ) accessStr = "None" print accessStr print ")" print "\n" } } recurseFolders(item(fullName current Folder))
-Parin |
Re: List access rights to all modules in a database using dxl Parin - Thu Jan 06 17:23:59 EST 2011 |
Re: List access rights to all modules in a database using dxl SystemAdmin - Thu Jun 28 09:43:31 EDT 2012
if this case you would insert: ... if (type parentItem == "Formal" || type parentItem == "Link") return ...
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|