[freeside-commits] freeside/FS/FS Conf.pm, 1.150, 1.151 svc_acct.pm, 1.193, 1.194

Ivan,,, ivan at wavetail.420.am
Mon Apr 3 16:26:05 PDT 2006


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv17606

Modified Files:
	Conf.pm svc_acct.pm 
Log Message:
option to disable global uniqueness checking

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -d -r1.150 -r1.151
--- Conf.pm	20 Mar 2006 19:13:26 -0000	1.150
+++ Conf.pm	3 Apr 2006 23:26:03 -0000	1.151
@@ -1455,9 +1455,9 @@
   {
     'key'         => 'global_unique-username',
     'section'     => 'username',
-    'description' => 'Global username uniqueness control: none (usual setting - check uniqueness per exports), username (all usernames are globally unique, regardless of domain or exports), or username at domain (all username at domain pairs are globally unique, regardless of exports)',
+    'description' => 'Global username uniqueness control: none (usual setting - check uniqueness per exports), username (all usernames are globally unique, regardless of domain or exports), or username at domain (all username at domain pairs are globally unique, regardless of exports).  disabled turns off duplicate checking completely and is STRONGLY NOT RECOMMENDED unless you REALLY need to turn this off.',
     'type'        => 'select',
-    'select_enum' => [ 'none', 'username', 'username at domain' ],
+    'select_enum' => [ 'none', 'username', 'username at domain', 'disabled' ],
   },
 
   {

Index: svc_acct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_acct.pm,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -d -r1.193 -r1.194
--- svc_acct.pm	25 Mar 2006 02:23:25 -0000	1.193
+++ svc_acct.pm	3 Apr 2006 23:26:03 -0000	1.194
@@ -902,6 +902,9 @@
 sub _check_duplicate {
   my $self = shift;
 
+  my $global_unique = $conf->config('global_unique-username') || 'none';
+  return '' if $global_unique eq 'disabled';
+
   #this is Pg-specific.  what to do for mysql etc?
   # ( mysql LOCK TABLES certainly isn't equivalent or useful here :/ )
   warn "$me locking svc_acct table for duplicate search" if $DEBUG;
@@ -914,8 +917,6 @@
     return 'unknown svcpart '. $self->svcpart;
   }
 
-  my $global_unique = $conf->config('global_unique-username') || 'none';
-
   my @dup_user = grep { !$self->svcnum || $_->svcnum != $self->svcnum }
                  qsearch( 'svc_acct', { 'username' => $self->username } );
   return gettext('username_in_use')



More information about the freeside-commits mailing list