From: ivan Date: Mon, 8 Nov 2010 05:24:06 +0000 (+0000) Subject: certificates ala communigate, RT#7515 X-Git-Tag: TORRUS_1_0_9~121 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=246e76618447bb7ac436e9bfb8c0b042f9613326;hp=e50b6ec8d63afe4c04ae33384758d8786fcc7cfe;ds=sidebyside certificates ala communigate, RT#7515 --- diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 4c85da1cf..b8ba5b2d4 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -1775,6 +1775,7 @@ sub tables_hashref { 'trailer', 'text', 'NULL', '', '', '', 'cgp_aliases', 'varchar', 'NULL', 255, '', '', 'cgp_accessmodes','varchar','NULL', 255, '', '', #DomainAccessModes + 'cgp_certificatetype','varchar','NULL', $char_d, '', '', #settings 'acct_def_password_selfchange', 'char', 'NULL', 1, '', '', 'acct_def_password_recover', 'char', 'NULL', 1, 'Y', '', diff --git a/FS/FS/part_export/communigate_pro.pm b/FS/FS/part_export/communigate_pro.pm index cc96086b1..a3ec5e0be 100644 --- a/FS/FS/part_export/communigate_pro.pm +++ b/FS/FS/part_export/communigate_pro.pm @@ -173,6 +173,8 @@ sub _export_insert_svc_domain { if $svc_domain->parent_svcnum; $settings{'TrailerText'} = $svc_domain->trailer if $svc_domain->trailer; + $settings{'CertificateType'} = $svc_domain->cgp_certificatetype + if $svc_domain->cgp_certificatetype; my @options = ( $create, $svc_domain->domain, \%settings ); @@ -426,6 +428,8 @@ sub _export_replace_svc_domain { $settings{'AdminDomainName'} = $new->parent_svcnum ? $new->parent_svc_x->domain : '' if $old->parent_svcnum != $new->parent_svcnum; + $settings{'CertificateType'} = $new->cgp_certificatetype + if $old->cgp_certificatetype ne $new->cgp_certificatetype; if ( keys %settings ) { my $error = $self->communigate_pro_queue( $new->svcnum, diff --git a/FS/FS/svc_CGP_Mixin.pm b/FS/FS/svc_CGP_Mixin.pm index 489e9791f..2eee37a31 100644 --- a/FS/FS/svc_CGP_Mixin.pm +++ b/FS/FS/svc_CGP_Mixin.pm @@ -131,6 +131,24 @@ sub cgp_emptytrash_values { ]; } +=item cgp_certificatetype_values + +Returns an arrayref of possible CertificateType values. + +=cut + +#http://www.communigate.com/cgatepro/PKI.html + +sub cgp_certificatetype_values { + + [ '', #