RFC: Automatic Account-Removal Script (possible contrib?)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RFC: Automatic Account-Removal Script (possible contrib?)

A. Karl Kornel
Dear all,

   I recently completed a script that others might find helpful.  
Given a domain, and a list of users in the domain, the script searches
for Bugzilla accounts with logins of user@domain, and changes the
logins to something not within the domain (so they won't conflict with
future users who get previously-used usernames).  If the script is
given a working e-mail address for the user, the script lets the user
know that their login has changed.  Once done, I'm happy to give it
away to anyone who would like to use it.

   Right now you can see the script (the source code, not actually
executable) in
<http://karl.karl.kornel.name/bugzilla/contrib/adsarp.pl>.  In
particular, the POD should hopefully provide a lot of information.

   I'm looking for constructive comments of all types.  Does it seem
useful?  Are there better* ways to implement certain portions?  
Questions or issues not addressed by the POD?  Pretty much anything
would be useful.

   Thanks in advance for the comments!
--
=============================
|   Alfred Karl Kornel
|   -- [hidden email]
|   Member- Europa Research Group
|   UNIX / RESOLVE Consultant
=============================

* I guess, with perl and its many ways to do it, better might not be the right word.

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
_______________________________________________
mozilla-webtools mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-webtools
Reply | Threaded
Open this post in threaded view
|

Re: RFC: Automatic Account-Removal Script (possible contrib?)

Max Kanat-Alexander
On Sun, 2005-06-12 at 08:58 -0400, A. Karl Kornel wrote:
> Are there better* ways to implement certain portions?

        Well, to start with, you should use standard Bugzilla functions instead
of re-writing every single little thing into manual DBI calls and custom
perl code, and instead of copying the functions out of the modules.
Actually "use" Bugzilla::Config for the parameters, Bugzilla->dbh for
the database handle, etc.

        You should "use constant" for the user-modifiable configuration
variables.

        Use templates for the email, and use standard Bugzilla ways of sending
email, like MessageToMTA.

        In general, also feel free to attach the script to an RFE and try to
get it into contrib/ if you feel at some point like it's ready for that.
It would require some basic review, since we do become (somewhat) the
maintainers of stuff in contrib/ once it's there.

        -Max
--
http://www.everythingsolved.com/
Everything Solved: Experts at Bugzilla... and everything else, too.

_______________________________________________
mozilla-webtools mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-webtools