83 lines
3.2 KiB
Plaintext
83 lines
3.2 KiB
Plaintext
{
|
|
|
|
# Remove default categories
|
|
delete $conf->{'applicationList'}->{'1sample'} if ($conf->{'applicationList'}->{'1sample'});
|
|
delete $conf->{'applicationList'}->{'2administration'} if ($conf->{'applicationList'}->{'2administration'});
|
|
delete $conf->{'applicationList'}->{'3documentation'} if ($conf->{'applicationList'}->{'3documentation'});
|
|
|
|
# Remove defaults vhost
|
|
foreach my $section (qw/locationRules vhostOptions exportedHeaders/){
|
|
delete $conf->{$section}->{'test1.example.com'} if ($conf->{$section}->{'test1.example.com'});
|
|
delete $conf->{$section}->{'test2.example.com'} if ($conf->{$section}->{'test2.example.com'});
|
|
delete $conf->{$section}->{'manager.example.com'} if ($conf->{$section}->{'manager.example.com'});
|
|
}
|
|
|
|
# Add defaults categories
|
|
$conf->{'applicationList'}->{'010apps'} = {
|
|
'catname' => 'Applications',
|
|
'type' => 'category',
|
|
} unless ($conf->{'applicationList'}->{'010apps'});
|
|
|
|
$conf->{'applicationList'}->{'020utils'} = {
|
|
'catname' => 'Outils',
|
|
'type' => 'category',
|
|
} unless ($conf->{'applicationList'}->{'020utils'});
|
|
|
|
$conf->{'applicationList'}->{'030admin'} = {
|
|
'sessions' => {
|
|
'options' => {
|
|
'logo' => 'lemonldap.png',
|
|
'name' => 'Explorateur de sessions',
|
|
'description' => 'Visualisation des sessions WebSSO LemonLDAP::NG',
|
|
'display' => 'auto',
|
|
'uri' => "https://sso-manager.$domain/sessions.pl"
|
|
},
|
|
'type' => 'application'
|
|
},
|
|
'ssomanager' => {
|
|
'options' => {
|
|
'logo' => 'lemonldap.png',
|
|
'name' => 'Configuration du webSSO LemonLDAP::NG',
|
|
'description' => 'Gestion avancée de la configuration',
|
|
'display' => 'auto',
|
|
'uri' => "https://sso-manager.$domain/"
|
|
},
|
|
'type' => 'application'
|
|
},
|
|
'catname' => 'Administration',
|
|
'type' => 'category',
|
|
} unless ($conf->{'applicationList'}->{'030admin'});
|
|
|
|
|
|
# Add default locationRules
|
|
$conf->{'locationRules'}->{"sso-manager.$domain"} = {
|
|
'default' => '$groups =~ /\\badmins\\b/ and ($localAccess or $externalSSLAccess)'
|
|
} unless ($conf->{'locationRules'}->{"sso-manager.$domain"});
|
|
|
|
# Add default exported var
|
|
$conf->{'exportedVars'}->{'mail'} = 'preferredMail' if (!$conf->{'exportedVars'}->{'mail'} || $conf->{'exportedVars'}->{'mail'} eq 'mail');
|
|
$conf->{'exportedVars'}->{'extension'} = 'extensionNumber' unless ($conf->{'exportedVars'}->{'extension'});
|
|
$conf->{'exportedVars'}->{'nom'} = 'sn' unless ($conf->{'exportedVars'}->{'nom'});
|
|
$conf->{'exportedVars'}->{'prenom'} = 'givenName' unless ($conf->{'exportedVars'}->{'prenom'});
|
|
|
|
# Remove ldapExportedVars which conflicts with exportedVars
|
|
foreach my $var (qw(mail nom prenom extension)){
|
|
delete $conf->{'ldapExportedVars'}->{$var} if ($conf->{'ldapExportedVars'}->{$var} && $conf->{'exportedVars'}->{$var});
|
|
}
|
|
|
|
# Initialize a random key
|
|
$conf->{'key'} = join( '', map { chr( int( rand(94) ) + 33 ) } ( 1 .. 16 ) ) unless ($conf->{'key'});
|
|
|
|
# Some other defaults config
|
|
$conf->{'timeout'} = '28800' if ($conf->{'timeout'} eq '72000');
|
|
$conf->{'portalDisplayAppslist'} = '1';
|
|
$conf->{'portalAutocomplete'} = '0';
|
|
$conf->{'portalDisplayResetPassword'} = '0';
|
|
|
|
# Use iPasserelle skin
|
|
$conf->{'portalSkin'} = 'ipasserelle' unless ($conf->{'portalSkin'});
|
|
|
|
$OUT .= '';
|
|
|
|
}
|