![]() |
Telelogic SYNERGY (steve huntington) | ![]() |
Topic Title: Users and their Roles Topic Summary: Displaying who has what power in HTML Created On: 10-May-2007 22:07 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
(This is a crossposting of a post I made on CM Crossroads. I thought I'd share it here, too) (Special thanks to Bill M for his perl script) This script opens the specified database (caveat emptor: there is some site-specific tailoring) and reads the user role information. It then outputs it to the file userroles_<db_alias>.html. You would call it as such: perl userroles.pl <database> In its current state, it's better as a cron job, but if you're 1337 enough (I'm only 1336...), then you can fashion it into a trigger that'll fire every time a user/role sort of thing gets updated. I intentionally didn't use the CGI module, but you're welcome to modify the code in order to do so. Feel free to modify this code to make it better. I'm sorry if any bits of it are outrageously JAPH-y. -------------------------------------------------------------------------------------------------------------------------------------- use ChangeSynergy::csapi; my $csapi = new ChangeSynergy::csapi(); my $secret_users = "(" . join("|", qw/ccm_root ChangeAdmin csuser/) . ")"; # feel free to change these to whatever names you don't want popping up $csapi->setUpConnection("http", "angler", 8600); # Tailor this for (my $i = 0; $i < $tmp->getDataSize(); $i++) { foreach (sort @{$raw_data}) { open HTMLOUT, ">userroles_${db_alias}.html"; select HTMLOUT; print "<html>\n"; select STDOUT; close HTMLOUT; ------------------------- The comments and opinions expressed are my own and do not represent the view of United Space Alliance. |
|
![]() |
Telelogic SYNERGY
» Scripts and Customizations
»
Users and their Roles
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.