diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/authentication.pm | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm index b48ef1819..110f270bf 100644 --- a/perl-install/authentication.pm +++ b/perl-install/authentication.pm @@ -51,21 +51,19 @@ sub ask_parameters { kerberos => N("security layout (SASL/Kerberos)"), ); - my $anonymous = "1"; my $AD_user = $authentication->{AD_user} =~ /(.*)\@\Q$val\E$/ ? $1 : $authentication->{AD_user}; + my $anonymous = $AD_user; $in->ask_from('', - N("Authentication Active Directory") . "\n\n", - [{ label => N("Domain") . "\n", val => \$val }, - { label => N("Server\n"), val => \$authentication->{AD_server} }, + N("Authentication Active Directory"), + [ { label => N("Domain"), val => \$val }, + { label => N("Server"), val => \$authentication->{AD_server} }, { label => N("LDAP users database"), val => \$authentication->{AD_users_db} }, - { label => N("Use Anonymous BIND "), val => \$anonymous, type => bool }, - { label => N("LDAP user allowed to browse the Active Directory"), val => \$AD_user, disabled => sub { $anonymous}}, - { label => N("Password for user"), val => \$authentication->{AD_password}, disabled => sub { $anonymous }}, - { label => N("Chiffrement"), val => \$authentication->{sub_kind}, list => [ map { $_->[0] } group_by2(@sub_kinds) ], format => sub { $sub_kinds{$_[0]} } }, + { label => N("Use Anonymous BIND "), val => \$anonymous, type => 'bool' }, + { label => N("LDAP user allowed to browse the Active Directory"), val => \$AD_user, disabled => sub { $anonymous } }, + { label => N("Password for user"), val => \$authentication->{AD_password}, disabled => sub { $anonymous } }, + { label => N("Encryption"), val => \$authentication->{sub_kind}, list => [ map { $_->[0] } group_by2(@sub_kinds) ], format => sub { $sub_kinds{$_[0]} } }, ]) or return; - - $authentication->{AD_user} = !$AD_user || $authentication->{sub_kind} eq 'anonymous' ? '' : $AD_user =~ /@/ ? $AD_user : "$AD_user\@$val"; $authentication->{AD_password} = '' if !$authentication->{AD_user}; |