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',
|
2020-05-02 17:48:34 +02:00
|
|
|
'public_root_url' => '/',
|
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 (
|
2020-05-12 19:23:24 +02:00
|
|
|
//'method' => 'basic', // Auth method : basic(default), HTTP, CAS or anonymous
|
|
|
|
'LSobjects' => array(
|
|
|
|
'LSpeople' => array(
|
|
|
|
'filter' => '(|(uid=%{user})(mail=%{user}))',
|
|
|
|
'password_attribute' => 'userPassword',
|
|
|
|
),
|
2020-05-12 20:12:57 +02:00
|
|
|
'LSsysaccount',
|
2020-05-12 19:23:24 +02:00
|
|
|
),
|
|
|
|
//'allow_multi_match' => false, // Allow username multiple match (default: false)
|
2009-10-31 02:33:01 +01:00
|
|
|
),
|
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 (
|
2020-05-19 18:59:30 +02:00
|
|
|
'uid=admin,ou=people,o=ls' => NULL,
|
|
|
|
'uid=eeggs,ou=people,o=ls' => NULL,
|
2008-11-12 17:57:40 +01:00
|
|
|
),
|
|
|
|
'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,
|
|
|
|
'LSaccess' => array(
|
2009-04-17 12:39:03 +02:00
|
|
|
'LSpeople',
|
2020-05-12 20:12:57 +02:00
|
|
|
'LSgroup',
|
|
|
|
'LSsysaccount',
|
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-05-12 19:23:24 +02:00
|
|
|
'LSauth' => array (
|
|
|
|
'LSobjects' => array('LSpeople'),
|
|
|
|
),
|
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-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',
|
2020-05-12 20:20:33 +02:00
|
|
|
'LScompany',
|
2020-05-12 20:12:57 +02:00
|
|
|
'LSsysaccount'
|
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,
|
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 (
|
2020-05-08 12:36:45 +02:00
|
|
|
array (
|
|
|
|
'handler' => 'file',
|
|
|
|
'path' => 'tmp/LS.log',
|
|
|
|
//'level' => 'DEBUG',
|
2020-06-30 11:03:48 +02:00
|
|
|
//'enabled' => false, // Uncomment to disable this handler
|
2020-05-08 12:32:21 +02:00
|
|
|
// Filter on specific loggers
|
|
|
|
//'loggers' => array('LSurl', 'LSlang'),
|
2020-05-08 13:18:17 +02:00
|
|
|
'excluded_loggers' => array('generate_lang_file', 'generate_ldapsaisie_pot'),
|
2020-05-08 12:32:21 +02:00
|
|
|
// Default formats
|
|
|
|
//'format' => '%{requesturi} - %{remoteaddr} - %{ldapservername} - %{authuser} - %{level} - %{message}',
|
|
|
|
//'cli_format' => '%{clibinpath} - %{level} - %{message}',
|
|
|
|
//'datetime_prefix' => true, // Prefix message with datetime ?
|
|
|
|
//'datetime_format' => 'Y/m/d H:i:s', // Datetime prefix format (see php date() function)
|
2020-05-08 12:36:45 +02:00
|
|
|
),
|
|
|
|
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:00:37 +02:00
|
|
|
);
|
2020-05-08 12:32:21 +02:00
|
|
|
$GLOBALS['LSlog']['loggers'] = array (
|
|
|
|
/**
|
|
|
|
* Loggers permit to define different log parameters for specific components
|
|
|
|
* of LdapSaisie (a class, an addon, ...). You could :
|
|
|
|
* - Enabled/disabled logs for this component with 'enabled' parameter
|
|
|
|
* - Set a specific log level for this component with 'enabled' parameter
|
|
|
|
**/
|
|
|
|
/*
|
|
|
|
'LSurl' => array (
|
|
|
|
'level' => 'DEBUG',
|
|
|
|
),
|
|
|
|
'LSldap' => array (
|
|
|
|
'level' => 'DEBUG',
|
|
|
|
),
|
|
|
|
'LSlang' => array (
|
|
|
|
'enabled' => false,
|
|
|
|
),
|
|
|
|
*/
|
|
|
|
);
|
2020-05-08 12:36:45 +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);
|
2020-05-20 18:45:46 +02:00
|
|
|
define('NB_LSOBJECT_LIST_SELECT',20);
|
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
|
|
|
|
2020-05-28 16:56:36 +02:00
|
|
|
// Default Javascript & CSS to include on all pages
|
2020-05-28 20:32:18 +02:00
|
|
|
$GLOBALS['defaultJSscripts']=array();
|
2020-05-05 14:53:34 +02:00
|
|
|
$GLOBALS['defaultCSSfiles']=array('light-blue.css');
|