Add support for buisnessCategory LDAP field

tags/ipasserelle-base-0.2.65-1
Daniel Berteaud 7 years ago
parent 3dd640bee9
commit 7d04a7220a
  1. 5
      root/etc/e-smith/events/actions/ldap-update-info
  2. 4
      root/etc/e-smith/locale/fr/etc/e-smith/web/functions/userinfo
  3. 4
      root/etc/e-smith/web/functions/userinfo
  4. 1
      root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/userinfo.pm

@ -69,14 +69,16 @@ foreach my $acc (@accounts){
my $initials = $acc->prop('Initials') || ''; my $initials = $acc->prop('Initials') || '';
my $dshell = $acc->prop('DesktopShell') || ''; my $dshell = $acc->prop('DesktopShell') || '';
my $preferredemail = $acc->prop('PreferredEmail') || ''; my $preferredemail = $acc->prop('PreferredEmail') || '';
my $category = $acc->prop('Category') || '';
$preferredemail = "$user\@$domain" if ($preferredemail eq ''); $preferredemail = "$user\@$domain" if ($preferredemail eq '');
my $web = $acc->prop('Url') || ''; my $web = $acc->prop('Url') || '';
my (@postalcode,@mobile,@extension,@fax,@titles,@initials,@dshell,@preferredemail,@web) = (); my (@postalcode,@mobile,@extension,@fax,@titles,@initials,@dshell,@preferredemail,@category,@web) = ();
@postalcode = ($postalcode) unless ($postalcode eq ''); @postalcode = ($postalcode) unless ($postalcode eq '');
@mobile = ($mobile) unless ($mobile eq ''); @mobile = ($mobile) unless ($mobile eq '');
@extension = ($extension) unless ($extension eq ''); @extension = ($extension) unless ($extension eq '');
@fax = ($fax) unless ($fax eq ''); @fax = ($fax) unless ($fax eq '');
@category = ($category) unless ($category eq '');
foreach ($function1, $function2, $function3, $function4){ foreach ($function1, $function2, $function3, $function4){
push @titles, $_ if ($_ ne ''); push @titles, $_ if ($_ ne '');
} }
@ -94,6 +96,7 @@ foreach my $acc (@accounts){
initials => \@initials, initials => \@initials,
desktopLoginShell => \@dshell, desktopLoginShell => \@dshell,
preferredMail => \@preferredemail, preferredMail => \@preferredemail,
businessCategory => \@category,
labeledURI => \@web labeledURI => \@web
} }
); );

@ -64,6 +64,10 @@
<trans>Société</trans> <trans>Société</trans>
</entry> </entry>
<entry> <entry>
<base>CATEGORY</base>
<trans>Catégorie</trans>
</entry>
<entry>
<base>STREET_ADDRESS</base> <base>STREET_ADDRESS</base>
<trans>Adresse</trans> <trans>Adresse</trans>
</entry> </entry>

@ -78,6 +78,10 @@ __DATA__
value="get_ldap_value('Company')"> value="get_ldap_value('Company')">
<label>COMPANY</label> <label>COMPANY</label>
</field> </field>
<field type="text" size="30" id="Category"
value="get_ldap_value('Category')">
<label>CATEGORY</label>
</field>
<field type="text" size="30" id="Street" <field type="text" size="30" id="Street"
value="get_ldap_value('Street')"> value="get_ldap_value('Street')">
<label>STREET_ADDRESS</label> <label>STREET_ADDRESS</label>

@ -213,6 +213,7 @@ sub modify_user {
'AltEmail3' => $self->{cgi}->param('AltEmail3'), 'AltEmail3' => $self->{cgi}->param('AltEmail3'),
'AltEmail4' => $self->{cgi}->param('AltEmail4'), 'AltEmail4' => $self->{cgi}->param('AltEmail4'),
'PreferredEmail' => $self->{cgi}->param('PreferredEmail'), 'PreferredEmail' => $self->{cgi}->param('PreferredEmail'),
'Category' => $self->{cgi}->param('PreferredCategory'),
'Url' => $self->{cgi}->param('Url'), 'Url' => $self->{cgi}->param('Url'),
'Shell' => $self->{cgi}->param('Shell'), 'Shell' => $self->{cgi}->param('Shell'),
'DesktopShell' => $self->{cgi}->param('DesktopShell'), 'DesktopShell' => $self->{cgi}->param('DesktopShell'),

Loading…
Cancel
Save