[freeside-commits] freeside/FS/FS Conf.pm, 1.315, 1.316 svc_acct.pm, 1.266, 1.267

Ivan,,, ivan at wavetail.420.am
Fri Sep 25 03:14:32 PDT 2009


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv18545/FS/FS

Modified Files:
	Conf.pm svc_acct.pm 
Log Message:
nomadix, RT#5876

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.315
retrieving revision 1.316
diff -u -d -r1.315 -r1.316
--- Conf.pm	25 Sep 2009 02:30:20 -0000	1.315
+++ Conf.pm	25 Sep 2009 10:14:30 -0000	1.316
@@ -1452,22 +1452,23 @@
   {
     'key'         => 'signup_server-default_svcpart',
     'section'     => '',
-    'description' => 'Default svcpart for the signup server - only necessary for services that trigger special provisioning widgets (such as DID provisioning).',
-    'type'        => 'select-sub',
-    'options_sub' => sub { require FS::Record;
-                           require FS::part_svc;
-                           map { $_->svcpart => $_->svc }
-                               FS::Record::qsearch( 'part_svc',
-			                            { 'disabled' => ''}
-						  );
-			 },
-    'option_sub'  => sub { require FS::Record;
-                           require FS::part_svc;
-                           my $part_svc = FS::Record::qsearchs(
-			     'part_svc', { 'svcpart'=>shift }
-			   );
-                           $part_svc ? $part_svc->svc : '';
-			 },
+    'description' => 'Default service definition for the signup server - only necessary for services that trigger special provisioning widgets (such as DID provisioning).',
+    'type'        => 'select-part_svc',
+  },
+
+  {
+    'key'         => 'signup_server-mac_addr_svcparts',
+    'section'     => '',
+    'description' => 'Service definitions which can receive mac addresses (current mapped to username for svc_acct).',
+    'type'        => 'select-part_svc',
+    'multiple'    => 1,
+  },
+
+  {
+    'key'         => 'signup_server-nomadix',
+    'section'     => '',
+    'description' => 'Signup page Nomadix integration',
+    'type'        => 'checkbox',
   },
 
   {
@@ -1866,7 +1867,7 @@
     'key'         => 'svc_www-usersvc_svcpart',
     'section'     => '',
     'description' => 'Allowable service definition svcparts for virtual hosts, one per line.',
-    'type'        => 'textarea',
+    'type'        => 'textarea', #select-part_svc ... multiple
   },
 
   {
@@ -2827,7 +2828,7 @@
     'key'         => 'mcp_svcpart',
     'section'     => '',
     'description' => 'Master Control Program svcpart.  Leave this blank.',
-    'type'        => 'text',
+    'type'        => 'text', #select-part_svc
   },
 
   {

Index: svc_acct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_acct.pm,v
retrieving revision 1.266
retrieving revision 1.267
diff -u -d -r1.266 -r1.267
--- svc_acct.pm	14 Aug 2009 22:13:02 -0000	1.266
+++ svc_acct.pm	25 Sep 2009 10:14:30 -0000	1.267
@@ -56,7 +56,8 @@
   @shells = $conf->config('shells');
   $usernamemin = $conf->config('usernamemin') || 2;
   $usernamemax = $conf->config('usernamemax');
-  $passwordmin = $conf->config('passwordmin') || 6;
+  $passwordmin = $conf->config('passwordmin'); # || 6;
+  $passwordmin = ( $passwordmin =~ /\d+/ ) ? $passwordmin : 6; #blank->6, keep 0
   $passwordmax = $conf->config('passwordmax') || 8;
   $username_letter = $conf->exists('username-letter');
   $username_letterfirst = $conf->exists('username-letterfirst');
@@ -1231,7 +1232,7 @@
     #carp "warning: _password_encoding unspecified\n";
 
     #generate a password if it is blank
-    unless ( length( $recref->{_password} ) ) {
+    unless ( length($recref->{_password}) || ! $passwordmin ) {
 
       $recref->{_password} =
         join('',map($pw_set[ int(rand $#pw_set) ], (0..7) ) );



More information about the freeside-commits mailing list