Add version in conf (to be used later with #797)
This commit is contained in:
parent
16380cb563
commit
f63e5eaca1
|
@ -86,6 +86,7 @@
|
||||||
"authentication" : "Demo",
|
"authentication" : "Demo",
|
||||||
"cfgAuthor" : "The LemonLDAP::NG team",
|
"cfgAuthor" : "The LemonLDAP::NG team",
|
||||||
"cfgNum" : 1,
|
"cfgNum" : 1,
|
||||||
|
"cfgVersion" : "2.0.0",
|
||||||
"cookieName" : "lemonldap",
|
"cookieName" : "lemonldap",
|
||||||
"demoExportedVars" : {
|
"demoExportedVars" : {
|
||||||
"cn" : "cn",
|
"cn" : "cn",
|
||||||
|
|
|
@ -39,6 +39,7 @@ Num : $conf->{cfgNum}
|
||||||
Author : $conf->{cfgAuthor}
|
Author : $conf->{cfgAuthor}
|
||||||
Author IP: $conf->{cfgAuthorIP}
|
Author IP: $conf->{cfgAuthorIP}
|
||||||
Date : } . localtime( $conf->{cfgDate} ) . qq{
|
Date : } . localtime( $conf->{cfgDate} ) . qq{
|
||||||
|
Version : $conf->{cfgVersion}
|
||||||
Log : $conf->{cfgLog}
|
Log : $conf->{cfgLog}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -646,7 +646,7 @@ sub metadatas {
|
||||||
return $self->sendError( $req, undef, 400 ) if ( $req->error );
|
return $self->sendError( $req, undef, 400 ) if ( $req->error );
|
||||||
return $self->sendError( $req, "Configuration without cfgNum", 500 )
|
return $self->sendError( $req, "Configuration without cfgNum", 500 )
|
||||||
unless ( defined $res->{cfgNum} );
|
unless ( defined $res->{cfgNum} );
|
||||||
foreach my $key (qw(cfgAuthor cfgDate cfgAuthorIP cfgLog)) {
|
foreach my $key (qw(cfgAuthor cfgDate cfgAuthorIP cfgLog cfgVersion)) {
|
||||||
$res->{$key} = $self->getConfKey( $req, $key );
|
$res->{$key} = $self->getConfKey( $req, $key );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -670,6 +670,9 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
'type' => 'int'
|
'type' => 'int'
|
||||||
},
|
},
|
||||||
|
'cfgVersion' => {
|
||||||
|
'type' => 'text'
|
||||||
|
},
|
||||||
'checkXSS' => {
|
'checkXSS' => {
|
||||||
'default' => 1,
|
'default' => 1,
|
||||||
'type' => 'bool'
|
'type' => 'bool'
|
||||||
|
|
|
@ -236,6 +236,10 @@ sub attributes {
|
||||||
type => 'longtext',
|
type => 'longtext',
|
||||||
documentation => 'Configuration update log',
|
documentation => 'Configuration update log',
|
||||||
},
|
},
|
||||||
|
cfgVersion => {
|
||||||
|
type => 'text',
|
||||||
|
documentation => 'Version of LLNG which build configuration',
|
||||||
|
},
|
||||||
confirmFormMethod => {
|
confirmFormMethod => {
|
||||||
type => "select",
|
type => "select",
|
||||||
select =>
|
select =>
|
||||||
|
|
|
@ -127,6 +127,7 @@ sub scanTree {
|
||||||
|| '_whatToTrace' } // "anonymous";
|
|| '_whatToTrace' } // "anonymous";
|
||||||
$self->newConf->{cfgAuthorIP} = $self->req->address;
|
$self->newConf->{cfgAuthorIP} = $self->req->address;
|
||||||
$self->newConf->{cfgDate} = time;
|
$self->newConf->{cfgDate} = time;
|
||||||
|
$self->newConf->{cfgVersion} = $VERSION;
|
||||||
$self->newConf->{key} ||=
|
$self->newConf->{key} ||=
|
||||||
join( '', map { chr( int( rand(94) ) + 33 ) } ( 1 .. 16 ) );
|
join( '', map { chr( int( rand(94) ) + 33 ) } ( 1 .. 16 ) );
|
||||||
|
|
||||||
|
|
|
@ -166,6 +166,7 @@ sub zeroConf {
|
||||||
'securedCookie' => 0,
|
'securedCookie' => 0,
|
||||||
'cookieName' => 'lemonldap',
|
'cookieName' => 'lemonldap',
|
||||||
'cfgAuthor' => 'The LemonLDAP::NG team',
|
'cfgAuthor' => 'The LemonLDAP::NG team',
|
||||||
|
'cfgVersion' => $VERSION,
|
||||||
'exportedVars' => {
|
'exportedVars' => {
|
||||||
'UA' => 'HTTP_USER_AGENT'
|
'UA' => 'HTTP_USER_AGENT'
|
||||||
},
|
},
|
||||||
|
|
|
@ -25,6 +25,10 @@
|
||||||
<th><span trspan="date"></span></th>
|
<th><span trspan="date"></span></th>
|
||||||
<td>{{currentCfg.date}}</td>
|
<td>{{currentCfg.date}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr ng-if="currentCfg.cfgVersion">
|
||||||
|
<th><span trspan="cfgVersion"></span></th>
|
||||||
|
<td>{{currentCfg.cfgVersion}}</td>
|
||||||
|
</tr>
|
||||||
<tr ng-if="currentCfg.cfgLog">
|
<tr ng-if="currentCfg.cfgLog">
|
||||||
<th><span trspan="cfgLog"></span></th>
|
<th><span trspan="cfgLog"></span></th>
|
||||||
<td id="cfglog">{{currentCfg.cfgLog}}</td>
|
<td id="cfglog">{{currentCfg.cfgLog}}</td>
|
||||||
|
|
|
@ -118,6 +118,7 @@
|
||||||
"cspConnect": "Ajax destinations",
|
"cspConnect": "Ajax destinations",
|
||||||
"cspFont": "Font source",
|
"cspFont": "Font source",
|
||||||
"cfgLog": "Resume",
|
"cfgLog": "Resume",
|
||||||
|
"cfgVersion": "Configuration version",
|
||||||
"checkXSS": "Check XSS attacks",
|
"checkXSS": "Check XSS attacks",
|
||||||
"clickHereToForce": "Click here to force",
|
"clickHereToForce": "Click here to force",
|
||||||
"choiceParams": "Choice parameters",
|
"choiceParams": "Choice parameters",
|
||||||
|
|
|
@ -118,6 +118,7 @@
|
||||||
"cspConnect": "Destinations des requêtes Ajax",
|
"cspConnect": "Destinations des requêtes Ajax",
|
||||||
"cspFont": "Font source",
|
"cspFont": "Font source",
|
||||||
"cfgLog": "Résumé",
|
"cfgLog": "Résumé",
|
||||||
|
"cfgVersion": "Version de la configuration",
|
||||||
"checkXSS": "Contrôler les attaques XSS",
|
"checkXSS": "Contrôler les attaques XSS",
|
||||||
"clickHereToForce": "Cliquer ici pour forcer",
|
"clickHereToForce": "Cliquer ici pour forcer",
|
||||||
"choiceParams": "Paramètres des choix",
|
"choiceParams": "Paramètres des choix",
|
||||||
|
|
|
@ -22,7 +22,7 @@ my @notManagedAttributes = (
|
||||||
'oidcOPMetaDataOptions', 'vhostOptions',
|
'oidcOPMetaDataOptions', 'vhostOptions',
|
||||||
|
|
||||||
# Metadatas (added by manager itself)
|
# Metadatas (added by manager itself)
|
||||||
'cfgAuthor', 'cfgAuthorIP', 'cfgNum', 'cfgDate', 'cfgLog',
|
'cfgAuthor', 'cfgAuthorIP', 'cfgNum', 'cfgDate', 'cfgLog', 'cfgVersion',
|
||||||
|
|
||||||
# HTML template parameter (for PSGI) (must be set in lemonldap-ng.ini)
|
# HTML template parameter (for PSGI) (must be set in lemonldap-ng.ini)
|
||||||
'staticPrefix',
|
'staticPrefix',
|
||||||
|
|
|
@ -1113,6 +1113,7 @@ sub registration {
|
||||||
|
|
||||||
$conf->{cfgAuthor} = "OpenID Connect Registration ($client_name)";
|
$conf->{cfgAuthor} = "OpenID Connect Registration ($client_name)";
|
||||||
$conf->{cfgAuthorIP} = $source_ip;
|
$conf->{cfgAuthorIP} = $source_ip;
|
||||||
|
$conf->{cfgVersion} = $VERSION;
|
||||||
|
|
||||||
$conf->{oidcRPMetaDataExportedVars}->{$rp} = {};
|
$conf->{oidcRPMetaDataExportedVars}->{$rp} = {};
|
||||||
$conf->{oidcRPMetaDataOptions}->{$rp}->{oidcRPMetaDataOptionsClientID} =
|
$conf->{oidcRPMetaDataOptions}->{$rp}->{oidcRPMetaDataOptionsClientID} =
|
||||||
|
|
Loading…
Reference in New Issue
Block a user