[rt-users] External Authentication and Users

Rich Graves rcgraves at brandeis.edu
Wed May 3 12:57:51 EDT 2000


On Wed, 3 May 2000, R. Eriks Goodwin wrote:

> Want to REALLY make my life wonderful?  :-)  How about integrating RT to
> utilize Lotus Domino user lists and group lists?  Maybe even a Domino
> interface for the database in general?  Any thoughts on this?

Can Domino expose information via LDAP? I made some quick hacks to the
adduser bits to autofill the full name and phone fields with Net::LDAP,
maybe you can do something similar. This is far from real directory
integration but it saved me a lot of typing.
-- 
Rich Graves <rcgraves at brandeis.edu>
UNet Systems Administrator

--- lib/rt/ui/web/admin.pm.orig	Tue Apr  4 21:08:44 2000
+++ lib/rt/ui/web/admin.pm	Tue Apr  4 22:24:16 2000
@@ -239,6 +239,25 @@
 
       if (!&rt::is_a_user($user_id)) {
 	&page_head("Create a new user called <b>$user_id</b>");
+	$rt::users{$user_id}{email} = "$user_id\@brandeis.edu";
+	use Net::LDAP;
+	my $ldap = new Net::LDAP ("ldap.unet.brandeis.edu");
+	$ldap->bind
+            || do { print "Couldn't bind to LDAP, try later."; return; };
+	
+	my $mesg = $ldap->search(
+            base => "ou=People,o=Brandeis University",
+            filter => "(mailacceptinggeneralid=$user_id)",
+	    scope => 1,
+	);
+	$mesg->code && do { print "LDAP problem: " . $mesg->error; return; };
+	my ($entry) = $mesg->entry || do { print "LDAP: no such user?"; return; };
+	($rt::users{$user_id}{real_name}) = $entry->get("cn");
+	($rt::users{$user_id}{office}) = $entry->get("phonebuilding");
+	my ($office) = $entry->get("phoneoffice");
+	$rt::users{$user_id}{office} .= " $office";
+	($rt::users{$user_id}{phone}) = $entry->get("telephonenumber");
+	$ldap->unbind;
       }
     elsif  ($user_id eq $current_user){
       &page_head("Modify your own attributes");
@@ -285,14 +304,6 @@
 </tr>
 <tr>
 <td>
-password:
-</td>
-<td>
-<input type=\"password\" name=\"password\" size=15><font size=\"-2\">(leave blank unless you want to change)</font>
-</td>
-</tr>
-<tr>
-<td>
 phone:
 </td>
 <td>
@@ -578,7 +589,7 @@
 <hr>
 <center>
 <font size=\"-1\">
-<a href=\"$ScriptURL\">Restart</a> | <a href=\"$ScriptURL?display=Logout\">Logout</a>
+<a href=\"$ScriptURL\">Restart</a> | <a href=\"$ScriptURL.logout\">Logout</a>
 <br>
 </font>
 </CENTER>






More information about the rt-users mailing list