2008-02-05 17:11:21 +01:00
|
|
|
<?php
|
|
|
|
/*******************************************************************************
|
|
|
|
* Copyright (C) 2007 Easter-eggs
|
|
|
|
* http://ldapsaisie.labs.libre-entreprise.org
|
|
|
|
*
|
|
|
|
* Author: See AUTHORS file in top-level directory.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License version 2
|
|
|
|
* as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
// Configuration LDAP Saisie :
|
|
|
|
$GLOBALS['LSconfig'] = array(
|
2008-04-25 15:48:12 +02:00
|
|
|
'NetLDAP2' => '/usr/share/php/Net/LDAP2.php',
|
2015-04-28 12:00:20 +02:00
|
|
|
'Smarty' => '/usr/share/php/smarty3/Smarty.class.php',
|
2020-04-29 19:20:59 +02:00
|
|
|
'ConsoleTable' => '/usr/share/php/Console/Table.php',
|
2009-03-19 18:42:51 +01:00
|
|
|
'lang' => 'fr_FR',
|
|
|
|
'encoding' => 'UTF8',
|
2009-01-02 17:00:25 +01:00
|
|
|
'cacheLSprofiles' => true,
|
2008-06-18 14:27:35 +02:00
|
|
|
'cacheSubDn' => true,
|
|
|
|
'cacheSearch' => true,
|
2019-10-25 18:37:13 +02:00
|
|
|
'globalSearch' => true,
|
2009-02-21 12:42:26 +01:00
|
|
|
'keepLSsessionActive' => true,
|
2008-02-08 18:39:24 +01:00
|
|
|
'ldap_servers' => array (
|
|
|
|
array (
|
2008-02-12 18:59:44 +01:00
|
|
|
'name' => 'LSexample',
|
2008-02-08 18:39:24 +01:00
|
|
|
'ldap_config'=> array(
|
|
|
|
'host' => '127.0.0.1',
|
|
|
|
'port' => 389,
|
|
|
|
'version' => 3,
|
|
|
|
'starttls' => false,
|
2008-08-06 19:04:03 +02:00
|
|
|
'binddn' => 'uid=ldapsaisie,ou=sysaccounts,o=ls',
|
|
|
|
'bindpw' => 'toto',
|
|
|
|
'basedn' => 'o=ls',
|
|
|
|
'options' => array(),
|
|
|
|
'filter' => '(objectClass=*)',
|
|
|
|
'scope' => 'sub'
|
|
|
|
),
|
2009-10-31 02:33:01 +01:00
|
|
|
/*
|
|
|
|
'LSauth' => array (
|
|
|
|
'method' => 'HTTP'
|
|
|
|
),
|
|
|
|
*/
|
2009-01-02 17:00:25 +01:00
|
|
|
'LSprofiles' => array (
|
2008-11-12 17:57:40 +01:00
|
|
|
'admin' => array (
|
2019-10-14 12:59:37 +02:00
|
|
|
'label' => 'Administrator',
|
2008-11-12 17:57:40 +01:00
|
|
|
'o=ls' => array (
|
|
|
|
'uid=eeggs,ou=people,o=ls' => NULL
|
|
|
|
),
|
|
|
|
'ou=people,o=ls' => array (
|
|
|
|
'cn=adminldap,ou=groups,o=ls' => array (
|
|
|
|
'attr' => 'uniqueMember',
|
2009-04-17 12:39:03 +02:00
|
|
|
'LSobject' => 'LSgroup'
|
2008-11-12 17:57:40 +01:00
|
|
|
)
|
|
|
|
)
|
2008-08-06 19:04:03 +02:00
|
|
|
),
|
2008-11-12 17:57:40 +01:00
|
|
|
'godfather' => array (
|
2019-10-14 12:59:37 +02:00
|
|
|
'label' => 'Godfather',
|
2008-11-12 17:57:40 +01:00
|
|
|
'LSobjects' => array (
|
2009-04-17 12:39:03 +02:00
|
|
|
'LSpeople' => array (
|
2008-11-12 17:57:40 +01:00
|
|
|
'attr' => 'lsGodfatherDn',
|
|
|
|
'attr_value' => '%{dn}',
|
|
|
|
'basedn' => 'ou=people,o=ls'
|
|
|
|
),
|
2009-04-17 12:39:03 +02:00
|
|
|
'LSgroup' => array (
|
2009-10-30 01:03:17 +01:00
|
|
|
'filter' => '(lsGodfatherDn=%{dn})'
|
2008-11-12 17:57:40 +01:00
|
|
|
)
|
2008-08-06 19:04:03 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
2009-01-02 17:00:25 +01:00
|
|
|
'cacheLSprofiles' => true,
|
2008-08-06 19:04:03 +02:00
|
|
|
'cacheSearch' => true,
|
2009-04-17 12:39:03 +02:00
|
|
|
'authObjectType' => 'LSpeople',
|
2009-03-09 14:14:37 +01:00
|
|
|
'authObjectFilter' => '(|(uid=%{user})(mail=%{user}))',
|
2009-04-08 14:26:24 +02:00
|
|
|
'authObjectTypeAttrPwd' => 'userPassword',
|
2008-08-06 19:04:03 +02:00
|
|
|
'LSaccess' => array(
|
2009-04-17 12:39:03 +02:00
|
|
|
'LSpeople',
|
|
|
|
'LSgroup'
|
2008-08-06 19:04:03 +02:00
|
|
|
),
|
|
|
|
'recoverPassword' => array(
|
|
|
|
'mailAttr' => 'mail',
|
|
|
|
'recoveryHashAttr' => 'lsRecoveryHash',
|
2008-10-31 13:12:31 +01:00
|
|
|
'recoveryEmailSender' => 'noreply-recover@ls.com',
|
2008-08-06 19:04:03 +02:00
|
|
|
'recoveryHashMail' => array(
|
2009-02-12 13:38:56 +01:00
|
|
|
'subject' => 'LSexample : Recovering your password.',
|
|
|
|
'msg' => "To proceed password recovery procedure, please follow that link:\n%{url}"
|
2008-08-06 19:04:03 +02:00
|
|
|
),
|
|
|
|
'newPasswordMail' => array(
|
2009-03-20 11:42:45 +01:00
|
|
|
'subject' => 'LSexample : Your new credentials.',
|
2009-02-12 13:38:56 +01:00
|
|
|
'msg' => "Your new password : %{mdp}"
|
2008-08-06 19:04:03 +02:00
|
|
|
)
|
|
|
|
),
|
2009-01-02 17:00:25 +01:00
|
|
|
'emailSender' => 'noreply@ls.com'
|
2008-08-06 19:04:03 +02:00
|
|
|
),
|
|
|
|
array (
|
2009-03-20 11:42:45 +01:00
|
|
|
'name' => 'LSexample - multi-company',
|
2008-08-06 19:04:03 +02:00
|
|
|
'ldap_config'=> array(
|
|
|
|
'host' => '127.0.0.1',
|
|
|
|
'port' => 389,
|
|
|
|
'version' => 3,
|
|
|
|
'starttls' => false,
|
2008-06-05 15:21:18 +02:00
|
|
|
'binddn' => 'uid=ldapsaisie,ou=sysaccounts,o=ls',
|
2008-02-08 18:39:24 +01:00
|
|
|
'bindpw' => 'toto',
|
|
|
|
'basedn' => 'o=ls',
|
|
|
|
'options' => array(),
|
|
|
|
'filter' => '(objectClass=*)',
|
|
|
|
'scope' => 'sub'
|
2008-08-06 19:04:03 +02:00
|
|
|
),
|
2020-04-29 15:54:21 +02:00
|
|
|
'LSprofiles' => array(
|
2008-11-12 17:57:40 +01:00
|
|
|
'admin' => array (
|
|
|
|
'o=ls' => array (
|
|
|
|
'uid=eeggs,ou=people,o=ls' => NULL,
|
|
|
|
'cn=adminldap,ou=groups,o=ls' => array (
|
|
|
|
'attr' => 'uniqueMember',
|
2009-04-17 12:39:03 +02:00
|
|
|
'LSobject' => 'LSgroup'
|
2008-11-12 17:57:40 +01:00
|
|
|
)
|
2008-08-06 19:04:03 +02:00
|
|
|
)
|
2009-11-11 21:00:59 +01:00
|
|
|
),
|
|
|
|
'admingroup' => array (
|
|
|
|
'ou=company1,ou=companies,o=ls' => array (
|
|
|
|
'uid=user1,ou=people,ou=company1,ou=companies,o=ls' => NULL
|
|
|
|
)
|
2008-08-06 19:04:03 +02:00
|
|
|
)
|
|
|
|
),
|
2009-04-17 12:39:03 +02:00
|
|
|
'authObjectType' => 'LSpeople',
|
2009-03-19 18:42:51 +01:00
|
|
|
'subDnLabel' => 'Company',
|
2008-08-06 19:04:03 +02:00
|
|
|
'subDn' => array(
|
2009-03-20 11:42:45 +01:00
|
|
|
'== All ==' => array(
|
2008-08-06 19:04:03 +02:00
|
|
|
'dn' => 'o=ls',
|
|
|
|
'LSobjects' => array(
|
2009-04-17 12:39:03 +02:00
|
|
|
'LSpeople',
|
|
|
|
'LSgroup',
|
|
|
|
'LScompany'
|
2008-08-06 19:04:03 +02:00
|
|
|
)
|
2008-02-08 18:39:24 +01:00
|
|
|
),
|
2008-08-06 19:04:03 +02:00
|
|
|
'LSobject' => array(
|
2009-04-17 12:39:03 +02:00
|
|
|
'LScompany' => array(
|
2008-08-06 19:04:03 +02:00
|
|
|
'LSobjects' => array(
|
2009-04-17 12:39:03 +02:00
|
|
|
'LSpeople',
|
|
|
|
'LSgroup'
|
2008-02-08 18:39:24 +01:00
|
|
|
)
|
|
|
|
)
|
2008-08-06 19:04:03 +02:00
|
|
|
)
|
2008-06-21 18:16:15 +02:00
|
|
|
),
|
2009-01-02 17:00:25 +01:00
|
|
|
'cacheLSprofiles' => true,
|
2008-08-06 19:04:03 +02:00
|
|
|
'cacheSearch' => true,
|
2019-10-25 18:37:13 +02:00
|
|
|
'globalSearch' => true,
|
2009-01-02 17:00:25 +01:00
|
|
|
'authObjectTypeAttrPwd' => 'userPassword',
|
2008-06-05 15:21:18 +02:00
|
|
|
'recoverPassword' => array(
|
|
|
|
'mailAttr' => 'mail',
|
|
|
|
'recoveryHashAttr' => 'lsRecoveryHash',
|
|
|
|
'recoveryEmailSender' => 'noreply-recover@lsexample.net',
|
|
|
|
'recoveryHashMail' => array(
|
2009-02-12 13:38:56 +01:00
|
|
|
'subject' => 'LSexample : Recovering your password.',
|
|
|
|
'msg' => "To proceed password recovery procedure, please follow that link:\n%{url}"
|
2008-06-05 15:21:18 +02:00
|
|
|
),
|
|
|
|
'newPasswordMail' => array(
|
2009-02-12 13:38:56 +01:00
|
|
|
'subject' => 'LSexample : Your new credentials.',
|
|
|
|
'msg' => "Your new password : %{mdp}"
|
2008-06-05 15:21:18 +02:00
|
|
|
)
|
|
|
|
),
|
2009-01-02 17:00:25 +01:00
|
|
|
'emailSender' => 'noreply@lsexample.net'
|
2008-02-08 18:39:24 +01:00
|
|
|
)
|
|
|
|
)
|
2008-02-05 17:11:21 +01:00
|
|
|
);
|
|
|
|
|
2008-10-09 03:31:33 +02:00
|
|
|
// Interface
|
|
|
|
// Theme Black
|
|
|
|
//define('LS_THEME','black');
|
|
|
|
//define('LS_TEMPLATES_DIR', 'templates/default');
|
|
|
|
|
|
|
|
// Theme Default
|
|
|
|
define('LS_THEME','default');
|
2013-06-17 23:39:22 +02:00
|
|
|
define('LS_TEMPLATES_DIR', 'templates');
|
2013-06-19 00:53:26 +02:00
|
|
|
define('LS_IMAGES_DIR', 'images');
|
2013-06-19 03:06:29 +02:00
|
|
|
define('LS_CSS_DIR', 'css');
|
2008-10-09 03:31:33 +02:00
|
|
|
|
2008-02-05 17:11:21 +01:00
|
|
|
//Debug
|
2013-03-31 05:28:06 +02:00
|
|
|
define('LSdebug',false);
|
2008-02-05 17:11:21 +01:00
|
|
|
|
2019-06-28 18:00:37 +02:00
|
|
|
// Logging
|
|
|
|
$GLOBALS['LSlog']['handlers'] = array (
|
|
|
|
array (
|
|
|
|
'handler' => 'file',
|
|
|
|
'path' => 'tmp/LS.log',
|
|
|
|
),
|
|
|
|
array (
|
|
|
|
'handler' => 'email', // Email handler (each logged message generated an email)
|
|
|
|
'level' => 'FATAL',
|
|
|
|
'recipient' => 'root@localhost', // Email recipient
|
|
|
|
),
|
|
|
|
/*
|
|
|
|
array (
|
|
|
|
'handler' => 'syslog', // Syslog handler
|
|
|
|
//'priority' => 'WARNING', // Force priority : EMERG, ALERT, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG
|
|
|
|
),
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
array (
|
|
|
|
'handler' => 'system', // System logging (using PHP error_log)
|
|
|
|
'level' => 'ERROR',
|
|
|
|
),
|
|
|
|
*/
|
|
|
|
);
|
2019-06-28 18:26:52 +02:00
|
|
|
$GLOBALS['LSlog']['level'] = 'INFO'; // DEBUG, INFO, WARNING, ERROR, FATAL
|
2009-01-21 18:08:09 +01:00
|
|
|
$GLOBALS['LSlog']['enable'] = true;
|
|
|
|
|
2019-05-13 18:34:26 +02:00
|
|
|
define('NB_LSOBJECT_LIST',30);
|
2008-04-25 15:48:12 +02:00
|
|
|
define('NB_LSOBJECT_LIST_SELECT',11);
|
2019-09-04 11:49:06 +02:00
|
|
|
$GLOBALS['NB_LSOBJECT_LIST_CHOICES'] = array(30, 60, 100);
|
2008-02-26 18:40:05 +01:00
|
|
|
|
|
|
|
define('MAX_SEND_FILE_SIZE',2000000);
|
|
|
|
|
2008-02-05 17:11:21 +01:00
|
|
|
|
|
|
|
// Javascript
|
|
|
|
$GLOBALS['defaultJSscipts']=array(
|
2008-07-05 22:28:49 +02:00
|
|
|
'mootools-core.js',
|
|
|
|
'mootools-more.js',
|
2008-07-28 18:30:40 +02:00
|
|
|
'functions.js',
|
2009-04-14 20:00:10 +02:00
|
|
|
'LSdefault.js',
|
|
|
|
'LSinfosBox.js'
|
2008-02-05 17:11:21 +01:00
|
|
|
);
|
|
|
|
|
2015-01-08 15:15:40 +01:00
|
|
|
// CSS
|
2017-06-05 00:34:07 +02:00
|
|
|
$GLOBALS['defaultCSSfiles']=array('../light-blue.css');
|