premier commit

This commit is contained in:
Daniel Berteaud 2012-06-18 22:39:49 +02:00
commit aafda53f9d
3 changed files with 138 additions and 0 deletions

67
ipasserelle-portal.spec Normal file
View File

@ -0,0 +1,67 @@
Summary: iPasserelle webSSO module
%define name ipasserelle-portal
Name: %{name}
%define version 0.2.0
%define release 1
Version: %{version}
Release: %{release}%{?dist}
License: GPL
URL: http://www.ipasserelle-.com/
Group: SMEserver/addon
Source: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: /var/tmp/%{name}-%{version}
Requires: smeserver-lemonldap-ng => 0.1-15
Requires: ipasserelle-userpanel
Requires: smeserver-vacation
Requires: smeserver-userpanels
BuildRequires: e-smith-devtools
%description
Add a webSSO module based on LemonLDAP::NG
%changelog
* Mon Jun 18 2012 Daniel Berteaud <daniel@firewall-services.com> 0.2.0-1
- Import in GIT
- Don't require smeserver-mailsorting anymore
* Mon Oct 24 2011 Daniel Berteaud <daniel@firewall-services.com> 0.1-3
- Disable the password reset option in the portal
* Mon Jul 25 2011 Daniel Berteaud <daniel@firewall-services.com> 0.1-2
- Renamed to ipasserelle-portal
* Wed Jun 28 2011 Daniel Berteaud <daniel@firewall-services.com> 0.1-1
- initial release
%prep
%setup
%build
#perl createlinks
%install
rm -rf $RPM_BUILD_ROOT
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
rm -f %{name}-%{version}-filelist
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist
%clean
cd ..
rm -rf %{name}-%{version}
%pre
%preun
%post
%postun
%files -f %{name}-%{version}-filelist
%defattr(-,root,root)

View File

@ -0,0 +1 @@
self

View File

@ -0,0 +1,70 @@
{
# 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'});
}
# 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' => 'database.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' => 'configure.png',
'name' => 'Configuration du webSSO LemonLDAP::NG',
'description' => 'Gestion avanc&eacute;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'} 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'});
# Some other defaults config
$conf->{'timeout'} = '28800' if ($conf->{'timeout'} eq '72000');
$conf->{'portalDisplayAppslist'} = '1';
$conf->{'portalAutocomplete'} = '0';
$conf->{'portalDisplayResetPassword'} = '0';
$OUT .= '';
}