[freeside-commits] freeside/FS/FS Schema.pm, 1.191, 1.192 svc_acct.pm, 1.281, 1.282 Record.pm, 1.201, 1.202
Ivan,,,
ivan at wavetail.420.am
Sat Feb 20 14:33:08 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv7661/FS/FS
Modified Files:
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.191
retrieving revision 1.192
diff -u -d -r1.191 -r1.192
--- Schema.pm 17 Feb 2010 08:30:06 -0000 1.191
+++ Schema.pm 20 Feb 2010 22:33:06 -0000 1.192
@@ -1633,6 +1633,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.281
retrieving revision 1.282
diff -u -d -r1.281 -r1.282
--- svc_acct.pm 3 Feb 2010 02:16:54 -0000 1.281
+++ svc_acct.pm 20 Feb 2010 22:33:06 -0000 1.282
@@ -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.201
retrieving revision 1.202
diff -u -d -r1.201 -r1.202
--- Record.pm 9 Jan 2010 10:03:53 -0000 1.201
+++ Record.pm 20 Feb 2010 22:33:06 -0000 1.202
@@ -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