Remove useless parameters (#1605)
This commit is contained in:
parent
eec7237c7d
commit
aa7df251b7
|
@ -30,8 +30,6 @@ sub defaultValues {
|
||||||
'certificateResetByMailCeaAttribute' => 'description',
|
'certificateResetByMailCeaAttribute' => 'description',
|
||||||
'certificateResetByMailCertificateAttribute' =>
|
'certificateResetByMailCertificateAttribute' =>
|
||||||
'userCertificate;binary',
|
'userCertificate;binary',
|
||||||
'certificateResetByMailReplyTo' => 'noreply@example.com',
|
|
||||||
'certificateResetByMailSender' => 'noreply@example.com',
|
|
||||||
'certificateResetByMailURL' =>
|
'certificateResetByMailURL' =>
|
||||||
'http://auth.example.com/certificateReset',
|
'http://auth.example.com/certificateReset',
|
||||||
'certificateResetByMailValidityDelay' => 0,
|
'certificateResetByMailValidityDelay' => 0,
|
||||||
|
|
|
@ -773,14 +773,6 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
|
||||||
'default' => 'userCertificate;binary',
|
'default' => 'userCertificate;binary',
|
||||||
'type' => 'text'
|
'type' => 'text'
|
||||||
},
|
},
|
||||||
'certificateResetByMailReplyTo' => {
|
|
||||||
'default' => 'noreply@example.com',
|
|
||||||
'type' => 'text'
|
|
||||||
},
|
|
||||||
'certificateResetByMailSender' => {
|
|
||||||
'default' => 'noreply@example.com',
|
|
||||||
'type' => 'text'
|
|
||||||
},
|
|
||||||
'certificateResetByMailStep1Body' => {
|
'certificateResetByMailStep1Body' => {
|
||||||
'type' => 'longtext'
|
'type' => 'longtext'
|
||||||
},
|
},
|
||||||
|
|
|
@ -1468,39 +1468,27 @@ sub attributes {
|
||||||
type => 'text',
|
type => 'text',
|
||||||
default => 'userCertificate;binary',
|
default => 'userCertificate;binary',
|
||||||
},
|
},
|
||||||
certificateResetByMailStep1Body => {
|
|
||||||
type => 'longtext',
|
|
||||||
documentation => 'Custom Certificate reset mail body',
|
|
||||||
},
|
|
||||||
certificateResetByMailStep1Subject => {
|
certificateResetByMailStep1Subject => {
|
||||||
type => 'text',
|
type => 'text',
|
||||||
documentation => 'Mail subject for certificate reset email',
|
documentation => 'Mail subject for certificate reset email',
|
||||||
},
|
},
|
||||||
|
certificateResetByMailStep1Body => {
|
||||||
certificateResetByMailStep2Body => {
|
|
||||||
type => 'longtext',
|
type => 'longtext',
|
||||||
documentation => 'Custom confirm Certificate reset mail body',
|
documentation => 'Custom Certificate reset mail body',
|
||||||
},
|
},
|
||||||
certificateResetByMailStep2Subject => {
|
certificateResetByMailStep2Subject => {
|
||||||
type => 'text',
|
type => 'text',
|
||||||
documentation => 'Mail subject for reset confirmation',
|
documentation => 'Mail subject for reset confirmation',
|
||||||
},
|
},
|
||||||
|
certificateResetByMailStep2Body => {
|
||||||
|
type => 'longtext',
|
||||||
|
documentation => 'Custom confirm Certificate reset mail body',
|
||||||
|
},
|
||||||
certificateResetByMailURL => {
|
certificateResetByMailURL => {
|
||||||
type => 'url',
|
type => 'url',
|
||||||
default => 'http://auth.example.com/certificateReset',
|
default => 'http://auth.example.com/certificateReset',
|
||||||
documentation => 'URL of certificate reset page',
|
documentation => 'URL of certificate reset page',
|
||||||
},
|
},
|
||||||
certificateResetByMailSender => {
|
|
||||||
type => 'text',
|
|
||||||
default => 'noreply@example.com',
|
|
||||||
documentation => 'Sender address for certificate reset email',
|
|
||||||
},
|
|
||||||
certificateResetByMailReplyTo => {
|
|
||||||
type => 'text',
|
|
||||||
default => 'noreply@example.com',
|
|
||||||
documentation => 'Reply-To address for certificate reset email',
|
|
||||||
},
|
|
||||||
certificateResetByMailValidityDelay => {
|
certificateResetByMailValidityDelay => {
|
||||||
type => 'int',
|
type => 'int',
|
||||||
default => 0
|
default => 0
|
||||||
|
|
|
@ -664,8 +664,6 @@ sub tree {
|
||||||
title => 'certificateMailContent',
|
title => 'certificateMailContent',
|
||||||
form => 'simpleInputContainer',
|
form => 'simpleInputContainer',
|
||||||
nodes => [
|
nodes => [
|
||||||
'certificateResetByMailSender',
|
|
||||||
'certificateResetByMailReplyTo',
|
|
||||||
'certificateResetByMailStep1Subject',
|
'certificateResetByMailStep1Subject',
|
||||||
'certificateResetByMailStep1Body',
|
'certificateResetByMailStep1Body',
|
||||||
'certificateResetByMailStep2Subject',
|
'certificateResetByMailStep2Subject',
|
||||||
|
|
|
@ -147,8 +147,6 @@
|
||||||
"certificateResetByMailURL":"Reset page URL",
|
"certificateResetByMailURL":"Reset page URL",
|
||||||
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
|
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
|
||||||
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
|
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
|
||||||
"certificateResetByMailSender":"Mail sender",
|
|
||||||
"certificateResetByMailReplyTo":"Reply address",
|
|
||||||
"certificateResetByMailStep1Subject":"Reset mail subject",
|
"certificateResetByMailStep1Subject":"Reset mail subject",
|
||||||
"certificateResetByMailStep1Body":"Reset mail content",
|
"certificateResetByMailStep1Body":"Reset mail content",
|
||||||
"certificateResetByMailStep2Subject":"Confirmation mail subject",
|
"certificateResetByMailStep2Subject":"Confirmation mail subject",
|
||||||
|
|
|
@ -147,8 +147,6 @@
|
||||||
"certificateResetByMailURL":"Reset page URL",
|
"certificateResetByMailURL":"Reset page URL",
|
||||||
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
|
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
|
||||||
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
|
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
|
||||||
"certificateResetByMailSender":"Mail sender",
|
|
||||||
"certificateResetByMailReplyTo":"Reply address",
|
|
||||||
"certificateResetByMailStep1Subject":"Reset mail subject",
|
"certificateResetByMailStep1Subject":"Reset mail subject",
|
||||||
"certificateResetByMailStep1Body":"Reset mail content",
|
"certificateResetByMailStep1Body":"Reset mail content",
|
||||||
"certificateResetByMailStep2Subject":"Confirmation mail subject",
|
"certificateResetByMailStep2Subject":"Confirmation mail subject",
|
||||||
|
|
|
@ -147,8 +147,6 @@
|
||||||
"certificateResetByMailURL":"Reset page URL",
|
"certificateResetByMailURL":"Reset page URL",
|
||||||
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
|
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
|
||||||
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
|
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
|
||||||
"certificateResetByMailSender":"Mail sender",
|
|
||||||
"certificateResetByMailReplyTo":"Reply address",
|
|
||||||
"certificateResetByMailStep1Subject":"Reset mail subject",
|
"certificateResetByMailStep1Subject":"Reset mail subject",
|
||||||
"certificateResetByMailStep1Body":"Reset mail content",
|
"certificateResetByMailStep1Body":"Reset mail content",
|
||||||
"certificateResetByMailStep2Subject":"Confirmation mail subject",
|
"certificateResetByMailStep2Subject":"Confirmation mail subject",
|
||||||
|
|
|
@ -147,8 +147,6 @@
|
||||||
"certificateResetByMailURL":"URL de la page de réinitialisation",
|
"certificateResetByMailURL":"URL de la page de réinitialisation",
|
||||||
"certificateResetByMailCeaAttribute":"Attribut CEA du certificat",
|
"certificateResetByMailCeaAttribute":"Attribut CEA du certificat",
|
||||||
"certificateResetByMailCertificateAttribute":"Nom de l'attribut du certificat",
|
"certificateResetByMailCertificateAttribute":"Nom de l'attribut du certificat",
|
||||||
"certificateResetByMailSender":"Expéditeur",
|
|
||||||
"certificateResetByMailReplyTo":"Adresse pour la réponse",
|
|
||||||
"certificateResetByMailStep1Subject":"Sujet du mail de réinitialisation",
|
"certificateResetByMailStep1Subject":"Sujet du mail de réinitialisation",
|
||||||
"certificateResetByMailStep1Body":"Contenu du mail de réinitialisation",
|
"certificateResetByMailStep1Body":"Contenu du mail de réinitialisation",
|
||||||
"certificateResetByMailStep2Subject":"Sujet du mail de confirmation",
|
"certificateResetByMailStep2Subject":"Sujet du mail de confirmation",
|
||||||
|
|
|
@ -147,8 +147,6 @@
|
||||||
"certificateResetByMailURL":"Reset page URL",
|
"certificateResetByMailURL":"Reset page URL",
|
||||||
"certificateResetByMailCeaAttribute":"Certificat CEA attribut",
|
"certificateResetByMailCeaAttribute":"Certificat CEA attribut",
|
||||||
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
|
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
|
||||||
"certificateResetByMailSender":"Mail sender",
|
|
||||||
"certificateResetByMailReplyTo":"Reply address",
|
|
||||||
"certificateResetByMailStep1Subject":"Reset mail subject",
|
"certificateResetByMailStep1Subject":"Reset mail subject",
|
||||||
"certificateResetByMailStep1Body":"Reset mail content",
|
"certificateResetByMailStep1Body":"Reset mail content",
|
||||||
"certificateResetByMailStep2Subject":"Confirmation mail subject",
|
"certificateResetByMailStep2Subject":"Confirmation mail subject",
|
||||||
|
|
|
@ -147,8 +147,6 @@
|
||||||
"certificateResetByMailURL":"Reset page URL",
|
"certificateResetByMailURL":"Reset page URL",
|
||||||
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
|
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
|
||||||
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
|
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
|
||||||
"certificateResetByMailSender":"Mail sender",
|
|
||||||
"certificateResetByMailReplyTo":"Reply address",
|
|
||||||
"certificateResetByMailStep1Subject":"Reset mail subject",
|
"certificateResetByMailStep1Subject":"Reset mail subject",
|
||||||
"certificateResetByMailStep1Body":"Reset mail content",
|
"certificateResetByMailStep1Body":"Reset mail content",
|
||||||
"certificateResetByMailStep2Subject":"Confirmation mail subject",
|
"certificateResetByMailStep2Subject":"Confirmation mail subject",
|
||||||
|
|
|
@ -147,8 +147,6 @@
|
||||||
"certificateResetByMailURL":"Reset page URL",
|
"certificateResetByMailURL":"Reset page URL",
|
||||||
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
|
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
|
||||||
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
|
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
|
||||||
"certificateResetByMailSender":"Mail sender",
|
|
||||||
"certificateResetByMailReplyTo":"Reply address",
|
|
||||||
"certificateResetByMailStep1Subject":"Reset mail subject",
|
"certificateResetByMailStep1Subject":"Reset mail subject",
|
||||||
"certificateResetByMailStep1Body":"Reset mail content",
|
"certificateResetByMailStep1Body":"Reset mail content",
|
||||||
"certificateResetByMailStep2Subject":"Confirmation mail subject",
|
"certificateResetByMailStep2Subject":"Confirmation mail subject",
|
||||||
|
|
|
@ -147,8 +147,6 @@
|
||||||
"certificateResetByMailURL":"Reset page URL",
|
"certificateResetByMailURL":"Reset page URL",
|
||||||
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
|
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
|
||||||
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
|
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
|
||||||
"certificateResetByMailSender":"Mail sender",
|
|
||||||
"certificateResetByMailReplyTo":"Reply address",
|
|
||||||
"certificateResetByMailStep1Subject":"Reset mail subject",
|
"certificateResetByMailStep1Subject":"Reset mail subject",
|
||||||
"certificateResetByMailStep1Body":"Reset mail content",
|
"certificateResetByMailStep1Body":"Reset mail content",
|
||||||
"certificateResetByMailStep2Subject":"Confirmation mail subject",
|
"certificateResetByMailStep2Subject":"Confirmation mail subject",
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -393,7 +393,7 @@ sub _certificateReset {
|
||||||
|
|
||||||
# Send mail
|
# Send mail
|
||||||
unless (
|
unless (
|
||||||
$self->sendmail(
|
$self->send_mail(
|
||||||
$req->data->{mailAddress}, $subject, $body, $html
|
$req->data->{mailAddress}, $subject, $body, $html
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -569,7 +569,7 @@ sub modifyCertificate {
|
||||||
|
|
||||||
# Send mail
|
# Send mail
|
||||||
return PE_MAILERROR
|
return PE_MAILERROR
|
||||||
unless $self->sendmail( $req->data->{mailAddress}, $subject, $body,
|
unless $self->send_mail( $req->data->{mailAddress}, $subject, $body,
|
||||||
$html );
|
$html );
|
||||||
|
|
||||||
return PE_MAILOK;
|
return PE_MAILOK;
|
||||||
|
@ -711,16 +711,6 @@ sub getCertificateSession {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Use Certificate Update parameter to send mail
|
|
||||||
sub sendmail {
|
|
||||||
my ( $self, $mail, $subject, $body, $html ) = @_;
|
|
||||||
|
|
||||||
$self->{mailFrom} = $self->conf->{certificateResetByMailSender};
|
|
||||||
$self->{mailReplyTo} = $self->conf->{certificateResetByMailReplyTo};
|
|
||||||
|
|
||||||
return $self->send_mail( $mail, $subject, $body, $html );
|
|
||||||
}
|
|
||||||
|
|
||||||
sub checkCertificateValidity {
|
sub checkCertificateValidity {
|
||||||
my ( $self, $notAfter, $delay ) = @_;
|
my ( $self, $notAfter, $delay ) = @_;
|
||||||
my $dtNow; # now in format DateTime
|
my $dtNow; # now in format DateTime
|
||||||
|
|
Loading…
Reference in New Issue
Block a user