From: ivan Date: Tue, 12 Feb 2002 02:11:07 +0000 (+0000) Subject: add username_policy "@append domain" X-Git-Tag: freeside_1_4_0pre11~64 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=ae23f6fe1ca915c995cfbf29bb39e7ed5e1cce2c add username_policy "@append domain" add "select" config type, mmm --- diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 3a4f5b9de..5de25510c 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -711,9 +711,10 @@ httemplate/docs/config.html { 'key' => 'username_policy', 'section' => '', - 'description' => 'This file controls the mechanism for preventing duplicate usernames in passwd/radius files exported from svc_accts. This should be one of \'prepend domsvc\' \'append domsvc\' or \'append domain\'', -# 'type' => 'select', - 'type' => 'text', + 'description' => 'This file controls the mechanism for preventing duplicate usernames in passwd/radius files exported from svc_accts. This should be one of \'prepend domsvc\' \'append domsvc\' \'append domain\' or \'append @domain\'', + 'type' => 'select', + 'select_enum' => [ 'prepend domsvc', 'append domsvc', 'append domain', 'append @domain' ], + #'type' => 'text', }, { diff --git a/bin/svc_acct.export b/bin/svc_acct.export index 3ac7a4f8f..e28de4aa7 100755 --- a/bin/svc_acct.export +++ b/bin/svc_acct.export @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# $Id: svc_acct.export,v 1.28 2001-12-12 07:59:33 ivan Exp $ +# $Id: svc_acct.export,v 1.29 2002-02-12 02:11:07 ivan Exp $ # # Create and export password, radius and vpopmail password files: # passwd, passwd.adjunct, shadow, acp_passwd, acp_userinfo, acp_dialup @@ -287,6 +287,10 @@ foreach $svc_domain (sort {$a->domain cmp $b->domain} @svc_domain) { $username=$svc_acct->username . $svc_acct->domsvc; } elsif ($userpolicy =~ /^append domain$/) { $username=$svc_acct->username . $svc_domain->domain; + } elsif ($userpolicy =~ /^append domain$/) { + $username=$svc_acct->username . $svc_domain->domain; + } elsif ($userpolicy =~ /^append @domain$/) { + $username=$svc_acct->username . '@'. $svc_domain->domain; } else { die "Unknown policy in username_policy\n"; } diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi index b9e84a8d5..f640d0b5e 100644 --- a/httemplate/config/config.cgi +++ b/httemplate/config/config.cgi @@ -30,6 +30,16 @@ exists($i->key) ? ' CHECKED' : '' %>> <% } elsif ( $type eq 'text' ) { %> + <% } elsif ( $type eq 'select' ) { %> +