commit aafda53f9d06cae6a3af517055e7ab882a8caa05 Author: Daniel Berteaud Date: Mon Jun 18 22:39:49 2012 +0200 premier commit diff --git a/ipasserelle-portal.spec b/ipasserelle-portal.spec new file mode 100644 index 0000000..a122dbc --- /dev/null +++ b/ipasserelle-portal.spec @@ -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 0.2.0-1 +- Import in GIT +- Don't require smeserver-mailsorting anymore + +* Mon Oct 24 2011 Daniel Berteaud 0.1-3 +- Disable the password reset option in the portal + +* Mon Jul 25 2011 Daniel Berteaud 0.1-2 +- Renamed to ipasserelle-portal + +* Wed Jun 28 2011 Daniel Berteaud 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) + diff --git a/root/etc/e-smith/db/configuration/defaults/lemonldap/ManagerAuth b/root/etc/e-smith/db/configuration/defaults/lemonldap/ManagerAuth new file mode 100644 index 0000000..31f9efa --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/lemonldap/ManagerAuth @@ -0,0 +1 @@ +self diff --git a/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/007default b/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/007default new file mode 100644 index 0000000..2f361c8 --- /dev/null +++ b/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/007default @@ -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é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 .= ''; + +}