[freeside-commits] freeside/FS/FS Schema.pm, 1.168.2.15, 1.168.2.16 svc_acct.pm, 1.268.2.12, 1.268.2.13 Record.pm, 1.196.2.5, 1.196.2.6

Ivan,,, ivan at wavetail.420.am
Sat Feb 20 14:33:12 PST 2010


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

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	Schema.pm svc_acct.pm Record.pm 
Log Message:
communigate pro provisioning, RT#7083

Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.168.2.15
retrieving revision 1.168.2.16
diff -u -d -r1.168.2.15 -r1.168.2.16
--- Schema.pm	17 Feb 2010 08:30:36 -0000	1.168.2.15
+++ Schema.pm	20 Feb 2010 22:33:10 -0000	1.168.2.16
@@ -1479,6 +1479,14 @@
         'pbxsvc',    'int', 'NULL', '', '', '',
         'last_login',  @date_type, '', '', 
         'last_logout', @date_type, '', '', 
+        #communigate pro fields (quota = MaxAccountSize)
+        'file_quota',      'varchar', 'NULL', $char_d, '', '', #MaxWebSize
+        'file_maxnum',     'varchar', 'NULL', $char_d, '', '', #MaxWebFiles
+        'file_maxsize',    'varchar', 'NULL', $char_d, '', '', #MaxFileSize
+        'cgp_accessmodes', 'varchar', 'NULL',     255, '', '', #AccessModes
+        'password_selfchange','char', 'NULL',       1, '', '', 
+        'password_recover',   'char', 'NULL',       1, '', '', 
+        'cgp_type',        'varchar', 'NULL', $char_d, '', '', #AccountType
       ],
       'primary_key' => 'svcnum',
       #'unique' => [ [ 'username', 'domsvc' ] ],

Index: svc_acct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_acct.pm,v
retrieving revision 1.268.2.12
retrieving revision 1.268.2.13
diff -u -d -r1.268.2.12 -r1.268.2.13
--- svc_acct.pm	3 Feb 2010 02:16:55 -0000	1.268.2.12
+++ svc_acct.pm	20 Feb 2010 22:33:10 -0000	1.268.2.13
@@ -277,6 +277,24 @@
                          disable_inventory => 1,
                          disable_select => 1,
                        },
+        'file_quota'=> { 
+                         label => 'File storage limit',
+                         type => 'text',
+                         disable_inventory => 1,
+                         disable_select => 1,
+                       },
+        'file_maxnum'=> { 
+                         label => 'Number of files limit',
+                         type => 'text',
+                         disable_inventory => 1,
+                         disable_select => 1,
+                       },
+        'file_maxsize'=> { 
+                         label => 'File size limit',
+                         type => 'text',
+                         disable_inventory => 1,
+                         disable_select => 1,
+                       },
         '_password' => 'Password',
         'gid'       => {
                          label    => 'GID',
@@ -1065,6 +1083,10 @@
               || $self->ut_enum( '_password_encoding',
                                  [ '', qw( plain crypt ldap ) ]
                                )
+              || $self->ut_enum( 'password_selfchange', [ '', 'Y' ] )
+              || $self->ut_enum( 'password_recover',    [ '', 'Y' ] )
+              || $self->ut_alphasn( 'cgp_accessmodes' )
+              || $self->ut_alphan( 'cgp_type' )
   ;
   return $error if $error;
 
@@ -1200,8 +1222,12 @@
       or return "Illegal finger: ". $self->getfield('finger');
   $self->setfield('finger', $1);
 
-  $recref->{quota} =~ /^(\w*)$/ or return "Illegal quota";
-  $recref->{quota} = $1;
+  for (qw( quota file_quota file_maxsize )) {
+    $recref->{$_} =~ /^(\w*)$/ or return "Illegal $_";
+    $recref->{$_} = $1;
+  }
+  $recref->{file_maxnum} =~ /^\s*(\d*)\s*$/ or return "Illegal file_maxnum";
+  $recref->{file_maxnum} = $1;
 
   unless ( $part_svc->part_svc_column('slipip')->columnflag eq 'F' ) {
     if ( $recref->{slipip} eq '' ) {

Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.196.2.5
retrieving revision 1.196.2.6
diff -u -d -r1.196.2.5 -r1.196.2.6
--- Record.pm	9 Jan 2010 10:04:27 -0000	1.196.2.5
+++ Record.pm	20 Feb 2010 22:33:10 -0000	1.196.2.6
@@ -2140,7 +2140,7 @@
   '';
 }
 
-=item ut_alpha COLUMN
+=item ut_alphan COLUMN
 
 Check/untaint alphanumeric strings (no spaces).  May be null.  If there is an
 error, returns the error, otherwise returns false.
@@ -2155,6 +2155,22 @@
   '';
 }
 
+=item ut_alphasn COLUMN
+
+Check/untaint alphanumeric strings, spaces allowed.  May be null.  If there is
+an error, returns the error, otherwise returns false.
+
+=cut
+
+sub ut_alphasn {
+  my($self,$field)=@_;
+  $self->getfield($field) =~ /^([\w ]*)$/ 
+    or return "Illegal (alphanumeric) $field: ". $self->getfield($field);
+  $self->setfield($field,$1);
+  '';
+}
+
+
 =item ut_alpha_lower COLUMN
 
 Check/untaint lowercase alphanumeric strings (no spaces).  May not be null.  If



More information about the freeside-commits mailing list