X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fldap.pm;h=823d99dbf1ad57d065fd760d2bc1f5a7f52d85a6;hp=57fd1f3f419ba8fe9496f8052896ffd6dedbd765;hb=dabdf357484badff95afcae50b08ec1c3bb58343;hpb=7de51deb0e3e3fe1b0a9e06be6498256d5511bd0 diff --git a/FS/FS/part_export/ldap.pm b/FS/FS/part_export/ldap.pm index 57fd1f3f4..823d99dbf 100644 --- a/FS/FS/part_export/ldap.pm +++ b/FS/FS/part_export/ldap.pm @@ -1,11 +1,50 @@ package FS::part_export::ldap; -use vars qw(@ISA @saltset); +use vars qw(@ISA %info @saltset); +use Tie::IxHash; use FS::Record qw( dbh ); use FS::part_export; @ISA = qw(FS::part_export); +tie my %options, 'Tie::IxHash', + 'dn' => { label=>'Root DN' }, + 'password' => { label=>'Root DN password' }, + 'userdn' => { label=>'User DN' }, + 'attributes' => { label=>'Attributes', + type=>'textarea', + default=>join("\n", + 'uid $username', + 'mail $username\@$domain', + 'uidno $uid', + 'gidno $gid', + 'cn $first', + 'sn $last', + 'mailquota $quota', + 'vmail', + 'location', + 'mailtag', + 'mailhost', + 'mailmessagestore $dir', + 'userpassword $crypt_password', + 'hint', + 'answer $sec_phrase', + 'objectclass top,person,inetOrgPerson', + ), + }, + 'radius' => { label=>'Export RADIUS attributes', type=>'checkbox', }, +; + +%info = ( + 'svc' => 'svc_acct', + 'desc' => 'Real-time export to LDAP', + 'options' => \%options, + 'notes' => <<'END' +Real-time export to arbitrary LDAP attributes. Requires installation of +Net::LDAP from CPAN. +END +); + @saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' ); sub rebless { shift; } @@ -251,3 +290,5 @@ sub ldap_connect { $ldap; } +1; +