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.
|
|
|
|
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
$GLOBALS['LSobjects']['LSeepeople'] = array (
|
|
|
|
'objectclass' => array(
|
|
|
|
'top',
|
2008-02-12 18:59:44 +01:00
|
|
|
'lspeople',
|
2008-02-05 17:11:21 +01:00
|
|
|
'posixAccount',
|
|
|
|
'sambaSamAccount',
|
|
|
|
),
|
2009-01-07 20:58:08 +01:00
|
|
|
'orderby' => 'displayName', // Valeurs possibles : 'displayName' ou 'subDn'
|
2008-02-05 17:11:21 +01:00
|
|
|
'rdn' => 'uid',
|
|
|
|
'container_dn' => 'ou=people',
|
2008-11-03 20:25:22 +01:00
|
|
|
|
2008-08-06 19:04:03 +02:00
|
|
|
'container_auto_create' => array(
|
|
|
|
'objectclass' => array(
|
|
|
|
'top',
|
|
|
|
'organizationalUnit'
|
|
|
|
),
|
|
|
|
'attrs' => array(
|
|
|
|
'ou' => 'people'
|
|
|
|
)
|
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
|
2008-09-09 17:48:07 +02:00
|
|
|
'before_modify' => 'valid',
|
|
|
|
'after_modify' => 'valid',
|
2008-11-10 00:17:28 +01:00
|
|
|
//'after_create' => 'createMaildirByFTP',
|
|
|
|
//'after_delete' => 'removeMaildirByFTP',
|
2009-01-07 20:24:14 +01:00
|
|
|
'display_name_format' => '%{cn}',
|
2008-02-08 18:39:24 +01:00
|
|
|
'label' => _('Utilisateurs'),
|
2008-11-03 20:25:22 +01:00
|
|
|
|
|
|
|
// LSrelation
|
2009-01-08 00:06:05 +01:00
|
|
|
'LSrelation' => array(
|
2008-02-26 18:40:05 +01:00
|
|
|
'groups' => array(
|
|
|
|
'label' => _('Appartient aux groupes...'),
|
2008-10-08 17:36:20 +02:00
|
|
|
'emptyText' => _("N'appartient à aucun groupe."),
|
2008-02-26 18:40:05 +01:00
|
|
|
'LSobject' => 'LSeegroup',
|
|
|
|
'list_function' => 'listUserGroups',
|
2008-10-09 11:50:38 +02:00
|
|
|
'getkeyvalue_function' => 'getMemberKeyValue',
|
2008-02-26 18:40:05 +01:00
|
|
|
'update_function' => 'updateUserGroups',
|
2008-07-29 15:45:02 +02:00
|
|
|
'remove_function' => 'deleteOneMember',
|
|
|
|
'rename_function' => 'renameOneMember',
|
2008-02-26 18:40:05 +01:00
|
|
|
'rights' => array(
|
|
|
|
'self' => 'r',
|
|
|
|
'admin' => 'w'
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
|
|
|
|
// LSform
|
|
|
|
'LSform' => array (
|
2009-02-12 11:04:50 +01:00
|
|
|
'ajaxSubmit' => 1,
|
2008-11-03 20:25:22 +01:00
|
|
|
// Layout
|
|
|
|
'layout' => array (
|
|
|
|
'Civilite' => array(
|
|
|
|
'label' => 'Civilité',
|
|
|
|
'img' => 1,
|
|
|
|
'args' => array (
|
|
|
|
'uid',
|
|
|
|
'personalTitle',
|
|
|
|
'givenName',
|
|
|
|
'sn',
|
|
|
|
'cn',
|
|
|
|
'mail',
|
2008-11-09 19:21:12 +01:00
|
|
|
'userPassword',
|
2008-11-03 20:25:22 +01:00
|
|
|
'description',
|
2008-11-12 17:57:40 +01:00
|
|
|
'jpegPhoto',
|
|
|
|
'lsGodfatherDn'
|
2008-11-03 20:25:22 +01:00
|
|
|
)
|
|
|
|
),
|
|
|
|
'Posix' => array (
|
|
|
|
'label' => 'Posix',
|
|
|
|
'args' => array (
|
|
|
|
'uidNumber',
|
|
|
|
'gidNumber',
|
|
|
|
'loginShell',
|
|
|
|
'homeDirectory'
|
|
|
|
)
|
|
|
|
),
|
|
|
|
'Samba' => array (
|
|
|
|
'label' => 'Samba',
|
|
|
|
'args' => array (
|
|
|
|
'sambaSID',
|
|
|
|
'sambaLMPassword',
|
|
|
|
'sambaNTPassword'
|
|
|
|
)
|
|
|
|
)
|
|
|
|
) // fin Layout
|
|
|
|
), // fin LSform
|
|
|
|
|
2009-01-25 18:43:30 +01:00
|
|
|
'LSsearch' => array (
|
|
|
|
'attrs' => array (
|
|
|
|
'givenName',
|
|
|
|
'sn',
|
|
|
|
'cn',
|
|
|
|
'uid',
|
|
|
|
'mail'
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
2008-02-08 18:39:24 +01:00
|
|
|
// Attributes
|
2008-02-05 17:11:21 +01:00
|
|
|
'attrs' => array (
|
2008-11-03 20:25:22 +01:00
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-02-05 17:11:21 +01:00
|
|
|
'uid' => array (
|
|
|
|
'label' => _('Identifiant'),
|
|
|
|
'ldap_type' => 'ascii',
|
|
|
|
'html_type' => 'text',
|
2008-10-31 13:12:31 +01:00
|
|
|
'html_options' => array(
|
|
|
|
'generate_value_format' => '%{givenName:1}.%{sn}',
|
|
|
|
'autoGenerateOnModify' => true, // default : false
|
|
|
|
'withoutAccent' => 1,
|
|
|
|
'replaceSpaces' => '.',
|
|
|
|
'lowerCase' => 1
|
|
|
|
),
|
2008-02-05 17:11:21 +01:00
|
|
|
'required' => 1,
|
|
|
|
'check_data' => array (
|
2009-01-25 19:10:00 +01:00
|
|
|
'regex' => array(
|
|
|
|
'msg' => _("L'identifiant ne doit comporter que des lettres, des chiffres ou des '.' ou des '-'."),
|
|
|
|
'params' => array('regex' => '/^[a-zA-Z0-9-_\.]*$/')
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
|
|
|
),
|
|
|
|
'validation' => array (
|
|
|
|
array (
|
|
|
|
'filter' => 'uid=%{val}',
|
|
|
|
'result' => 0,
|
2008-04-25 16:09:27 +02:00
|
|
|
'msg' => _('Cet identifiant est déjà utilisé.')
|
2008-02-05 17:11:21 +01:00
|
|
|
)
|
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'rights' => array(
|
|
|
|
'self' => 'r',
|
2008-11-12 17:57:40 +01:00
|
|
|
'admin' => 'w',
|
|
|
|
'godfather' => 'r'
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'view' => 1,
|
2008-02-05 17:11:21 +01:00
|
|
|
'form' => array (
|
2008-07-29 15:45:02 +02:00
|
|
|
'modify' => 1,
|
2008-02-12 18:59:44 +01:00
|
|
|
'create' => 1
|
2008-07-29 15:45:02 +02:00
|
|
|
),
|
|
|
|
'dependAttrs' => array(
|
|
|
|
'homeDirectory'
|
2008-02-05 17:11:21 +01:00
|
|
|
)
|
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-02-05 17:11:21 +01:00
|
|
|
'uidNumber' => array (
|
2008-04-25 16:09:27 +02:00
|
|
|
'label' => _('Identifiant (numérique)'),
|
2008-02-05 17:11:21 +01:00
|
|
|
'ldap_type' => 'numeric',
|
|
|
|
'html_type' => 'text',
|
|
|
|
'required' => 1,
|
|
|
|
'generate_function' => 'generate_uidNumber',
|
|
|
|
'check_data' => array (
|
|
|
|
'numeric' => array(
|
2008-04-25 16:09:27 +02:00
|
|
|
'msg' => _("L'identifiant unique doit être un entier.")
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
|
|
|
),
|
|
|
|
'validation' => array (
|
|
|
|
array (
|
|
|
|
'filter' => 'uidNumber=%{val}',
|
|
|
|
'result' => 0,
|
2008-04-25 16:09:27 +02:00
|
|
|
'msg' => _('Cet uid est déjà utilisé.')
|
2008-02-05 17:11:21 +01:00
|
|
|
)
|
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'rights' => array(
|
|
|
|
'admin' => 'w'
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'view' => 1,
|
2008-02-05 17:11:21 +01:00
|
|
|
'form' => array (
|
2008-02-12 18:59:44 +01:00
|
|
|
'modify' => 0,
|
2008-02-05 17:11:21 +01:00
|
|
|
)
|
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-02-05 17:11:21 +01:00
|
|
|
'givenName' => array (
|
|
|
|
'label' => _('Prenom'),
|
|
|
|
'ldap_type' => 'ascii',
|
|
|
|
'html_type' => 'text',
|
|
|
|
'required' => 1,
|
|
|
|
'default_value' => 'toto',
|
|
|
|
'check_data' => array (
|
|
|
|
'alphanumeric' => array(
|
|
|
|
'msg' => _('Le prenom ne doit comporter que des lettres et des chiffres.')
|
|
|
|
),
|
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'rights' => array(
|
2008-11-12 17:57:40 +01:00
|
|
|
'self' => 'r',
|
2008-02-08 18:39:24 +01:00
|
|
|
'users' => 'r',
|
2008-11-12 17:57:40 +01:00
|
|
|
'admin' => 'w',
|
|
|
|
'godfather' => 'w'
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'view' => 1,
|
2008-02-05 17:11:21 +01:00
|
|
|
'form' => array (
|
2008-02-12 18:59:44 +01:00
|
|
|
'modify' => 1,
|
|
|
|
'create' => 1
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
|
|
|
'onDisplay' => 'return_data'
|
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-02-05 17:11:21 +01:00
|
|
|
'sn' => array (
|
|
|
|
'label' => _('Nom'),
|
|
|
|
'ldap_type' => 'ascii',
|
|
|
|
'html_type' => 'text',
|
|
|
|
'required' => 1,
|
2008-02-12 18:59:44 +01:00
|
|
|
'rights' => array(
|
2008-11-12 17:57:40 +01:00
|
|
|
'self' => 'r',
|
2008-02-12 18:59:44 +01:00
|
|
|
'user' => 'r',
|
2008-11-12 17:57:40 +01:00
|
|
|
'admin' => 'w',
|
|
|
|
'godfather' => 'w'
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'view' => 1,
|
2008-02-05 17:11:21 +01:00
|
|
|
'form' => array (
|
2008-02-12 18:59:44 +01:00
|
|
|
'modify' => 1,
|
|
|
|
'create' => 1
|
2008-02-05 17:11:21 +01:00
|
|
|
)
|
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-07-28 18:30:40 +02:00
|
|
|
'cn' => array (
|
|
|
|
'label' => _('Nom complet'),
|
|
|
|
'ldap_type' => 'ascii',
|
|
|
|
'html_type' => 'text',
|
|
|
|
'html_options' => array(
|
|
|
|
'generate_value_format' => '%{givenName} %{sn}',
|
2008-10-14 16:33:51 +02:00
|
|
|
'autoGenerateOnModify' => true, // default : false
|
|
|
|
'autoGenerateOnCreate' => true // default : false
|
2008-07-28 18:30:40 +02:00
|
|
|
),
|
|
|
|
'required' => 1,
|
|
|
|
'validation' => 'valid',
|
|
|
|
'rights' => array(
|
2008-11-12 17:57:40 +01:00
|
|
|
'self' => 'r',
|
2008-07-28 18:30:40 +02:00
|
|
|
'user' => 'r',
|
2008-11-12 17:57:40 +01:00
|
|
|
'admin' => 'w',
|
|
|
|
'godfather' => 'w'
|
2008-07-28 18:30:40 +02:00
|
|
|
),
|
|
|
|
'view' => 1,
|
|
|
|
'form' => array (
|
|
|
|
'modify' => 1,
|
|
|
|
'create' => 1
|
|
|
|
)
|
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-02-05 17:11:21 +01:00
|
|
|
'gidNumber' => array (
|
|
|
|
'label' => _('Groupe principal'),
|
|
|
|
'ldap_type' => 'numeric',
|
|
|
|
'html_type' => 'select_list',
|
2009-01-28 09:13:36 +01:00
|
|
|
'html_options' => array (
|
|
|
|
'possible_values' => array(
|
|
|
|
'OTHER_OBJECT' => array(
|
|
|
|
'object_type' => 'LSeegroup', // Nom de l'objet à lister
|
2009-02-11 17:01:21 +01:00
|
|
|
'display_name_format' => '%{cn} (%{gidNumber})', // Spécifie le attributs à lister pour le choix,
|
|
|
|
// si non définie => utilisation du 'display_name_format'
|
2009-01-28 09:13:36 +01:00
|
|
|
// de la définition de l'objet
|
|
|
|
|
|
|
|
'value_attribute' => 'gidNumber', // Spécifie le attributs dont la valeur sera retournée par
|
|
|
|
/*'filter' => // le formulaire spécifie les filtres de recherche pour
|
|
|
|
array ( // l'établissement de la liste d'objets :
|
|
|
|
array( // Premier filtre
|
|
|
|
'filter' => 'cn=*a*',
|
|
|
|
//'basedn' => 'o=company',
|
|
|
|
'scope' => 'sub',
|
|
|
|
)
|
|
|
|
)*/
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'multiple' => false,
|
2008-02-05 17:11:21 +01:00
|
|
|
'required' => 1,
|
|
|
|
'validation' => array (
|
|
|
|
array (
|
2008-11-13 20:05:06 +01:00
|
|
|
'msg' => _("Ce groupe n'existe pas."),
|
2008-04-25 16:09:27 +02:00
|
|
|
'object_type' => 'LSeegroup', // 'object_type' : Permet definir le type d'objet recherchés
|
|
|
|
//'basedn' => 'o=company', // et d'utiliser les objectClass définis dans le fichier de configuration
|
2008-02-05 17:11:21 +01:00
|
|
|
'filter' => '(gidNumber=%{val})', // pour la recherche
|
|
|
|
'result' => 1
|
|
|
|
)
|
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'rights' => array(
|
2008-11-12 17:57:40 +01:00
|
|
|
'admin' => 'w',
|
|
|
|
'godfather' => 'r'
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'view' => 1,
|
2008-02-05 17:11:21 +01:00
|
|
|
'form' => array (
|
2008-02-12 18:59:44 +01:00
|
|
|
'modify' => 1,
|
|
|
|
'create' => 1
|
2008-02-05 17:11:21 +01:00
|
|
|
)
|
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-02-05 17:11:21 +01:00
|
|
|
'loginShell' => array (
|
|
|
|
'label' => _('Interpreteur de commande'),
|
2008-09-26 20:03:56 +02:00
|
|
|
'help_info' => _("Permet ou non a l'utilisateur de se connecter à un système POSIX."),
|
2008-09-26 15:57:11 +02:00
|
|
|
'ldap_type' => 'boolean',
|
2009-01-28 09:13:36 +01:00
|
|
|
'ldap_options' => array (
|
|
|
|
'true_value' => '/bin/bash',
|
|
|
|
'false_value' => '/bin/false'
|
|
|
|
),
|
2008-09-26 15:57:11 +02:00
|
|
|
'html_type' => 'boolean',
|
2008-02-05 17:11:21 +01:00
|
|
|
'required' => 1,
|
2008-10-15 12:46:09 +02:00
|
|
|
'default_value' => 'no',
|
2008-02-08 18:39:24 +01:00
|
|
|
'rights' => array(
|
|
|
|
'admin' => 'w'
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'view' => 1,
|
2008-02-05 17:11:21 +01:00
|
|
|
'form' => array (
|
2008-02-12 18:59:44 +01:00
|
|
|
'modify' => 1,
|
|
|
|
'create' => 1
|
2009-01-28 09:13:36 +01:00
|
|
|
)
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-02-05 17:11:21 +01:00
|
|
|
'sambaSID' => array (
|
|
|
|
'label' => _('Identifiant Samba'),
|
|
|
|
'ldap_type' => 'ascii',
|
|
|
|
'html_type' => 'text',
|
|
|
|
'required' => 1,
|
2009-01-22 16:35:37 +01:00
|
|
|
'generate_function' => 'generate_sambaUserSID',
|
2008-02-08 18:39:24 +01:00
|
|
|
'rights' => array(
|
|
|
|
'admin' => 'r'
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
|
|
|
'form' => array (
|
2008-11-03 20:25:22 +01:00
|
|
|
'modify' => 0
|
2008-02-05 17:11:21 +01:00
|
|
|
)
|
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-02-05 17:11:21 +01:00
|
|
|
'homeDirectory' => array (
|
2008-04-25 16:09:27 +02:00
|
|
|
'label' => _('Répertoire personnel'),
|
2008-02-05 17:11:21 +01:00
|
|
|
'ldap_type' => 'ascii',
|
|
|
|
'html_type' => 'text',
|
|
|
|
'required' => 1,
|
2008-02-08 18:39:24 +01:00
|
|
|
'generate_function' => 'generate_homeDirectory',
|
|
|
|
'rights' => array(
|
2008-11-12 17:57:40 +01:00
|
|
|
'admin' => 'r'
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
2008-07-29 15:45:02 +02:00
|
|
|
'view' => 1
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-02-05 17:11:21 +01:00
|
|
|
'mail' => array (
|
|
|
|
'label' => _('Adresse e-mail'),
|
|
|
|
'ldap_type' => 'ascii',
|
2008-10-15 19:40:04 +02:00
|
|
|
'html_type' => 'mail',
|
2008-07-28 18:30:40 +02:00
|
|
|
'html_options' => array(
|
2008-10-07 18:10:44 +02:00
|
|
|
'generate_value_format' => '%{givenName}.%{sn}@ls.com',
|
|
|
|
'withoutAccent' => 1,
|
|
|
|
'replaceSpaces' => '.',
|
|
|
|
'lowerCase' => 1
|
2008-07-28 18:30:40 +02:00
|
|
|
),
|
2008-02-05 17:11:21 +01:00
|
|
|
'required' => 1,
|
|
|
|
'check_data' => array (
|
|
|
|
'email' => array(
|
2008-06-05 15:21:18 +02:00
|
|
|
'msg' => _("L'adresse e-mail entrée n'est pas valide."),
|
2008-10-07 17:16:33 +02:00
|
|
|
'params' => array('checkDomain' => false)
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'rights' => array(
|
|
|
|
'self' => 'r',
|
|
|
|
'user' => 'r',
|
2008-11-12 17:57:40 +01:00
|
|
|
'admin' => 'w',
|
|
|
|
'godfather' => 'w'
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'view' => 1,
|
2008-02-05 17:11:21 +01:00
|
|
|
'form' => array (
|
2008-02-12 18:59:44 +01:00
|
|
|
'modify' => 1,
|
|
|
|
'create' => 1
|
2008-02-05 17:11:21 +01:00
|
|
|
)
|
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-02-05 17:11:21 +01:00
|
|
|
'personalTitle' => array (
|
|
|
|
'label' => _('Titre'),
|
|
|
|
'ldap_type' => 'ascii',
|
|
|
|
'html_type' => 'select_list',
|
2009-01-28 09:13:36 +01:00
|
|
|
'html_options' => array (
|
|
|
|
'possible_values' => array(
|
|
|
|
'M.' => 'M.',
|
|
|
|
'Mme' => 'Mme',
|
|
|
|
'Mlle' => 'Mlle'
|
|
|
|
)
|
|
|
|
),
|
2008-02-05 17:11:21 +01:00
|
|
|
'required' => 1,
|
|
|
|
'default_value' => 'M.',
|
2008-02-08 18:39:24 +01:00
|
|
|
'rights' => array(
|
2008-11-12 17:57:40 +01:00
|
|
|
'self' => 'r',
|
2008-02-08 18:39:24 +01:00
|
|
|
'user' => 'r',
|
2008-11-12 17:57:40 +01:00
|
|
|
'admin' => 'w',
|
|
|
|
'godfather' => 'w'
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'view' => 1,
|
2008-02-05 17:11:21 +01:00
|
|
|
'form' => array (
|
2008-02-12 18:59:44 +01:00
|
|
|
'modify' => 1,
|
|
|
|
'create' => 1
|
2008-02-05 17:11:21 +01:00
|
|
|
)
|
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-02-05 17:11:21 +01:00
|
|
|
'description' => array (
|
|
|
|
'label' => _('Description'),
|
|
|
|
'ldap_type' => 'ascii',
|
2008-10-09 03:31:33 +02:00
|
|
|
'html_type' => 'textarea',
|
2008-10-15 19:40:04 +02:00
|
|
|
'multiple' => 1,
|
2008-02-08 18:39:24 +01:00
|
|
|
'rights' => array(
|
2008-11-12 17:57:40 +01:00
|
|
|
'self' => 'r',
|
2008-02-08 18:39:24 +01:00
|
|
|
'user' => 'r',
|
2008-11-12 17:57:40 +01:00
|
|
|
'admin' => 'w',
|
|
|
|
'godfather' => 'w'
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'view' => 1,
|
2008-02-05 17:11:21 +01:00
|
|
|
'form' => array (
|
2008-02-12 18:59:44 +01:00
|
|
|
'modify' => 1,
|
|
|
|
'create' => 1
|
2008-02-05 17:11:21 +01:00
|
|
|
)
|
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-02-05 17:11:21 +01:00
|
|
|
'userPassword' => array (
|
|
|
|
'label' => _('Mot de passe'),
|
|
|
|
'ldap_type' => 'password',
|
2009-01-02 17:00:25 +01:00
|
|
|
'ldap_options' => array (
|
|
|
|
'encode' => 'md5'
|
|
|
|
),
|
2008-02-05 17:11:21 +01:00
|
|
|
'html_type' => 'password',
|
2008-05-07 16:09:47 +02:00
|
|
|
'html_options' => array(
|
|
|
|
'generationTool' => true,
|
|
|
|
'autoGenerate' => false,
|
2008-12-06 00:42:47 +01:00
|
|
|
'lenght' => 8,
|
|
|
|
'chars' => array (
|
|
|
|
array(
|
|
|
|
'nb' => 3,
|
|
|
|
'chars' => 'abcdefijklmnopqrstuvwxyz'
|
|
|
|
),
|
|
|
|
'0123456789',
|
|
|
|
'*$.:/_-[]{}=~'
|
|
|
|
),
|
2008-10-31 13:12:31 +01:00
|
|
|
'mail' => array(
|
|
|
|
'send' => 1,
|
|
|
|
'ask' => 1,
|
|
|
|
'subject' => "LSexample : votre nouveau mot de passe",
|
|
|
|
'msg' => "Votre mot de passe vient d'etre modifie.\nNouveau mot de passe : %{mdp}",
|
|
|
|
'mail_attr' => 'mail'
|
|
|
|
)
|
|
|
|
),
|
|
|
|
'check_data' => array(
|
|
|
|
'password' => array(
|
|
|
|
'msg' => 'Le mot de passe doit contenir entre 8 et 10 caractères.',
|
|
|
|
'params' => array(
|
|
|
|
'minLength' => 8,
|
2008-11-10 00:17:28 +01:00
|
|
|
'maxLength' => 10
|
2008-10-31 13:12:31 +01:00
|
|
|
)
|
|
|
|
)
|
2008-05-07 16:09:47 +02:00
|
|
|
),
|
2008-02-08 18:39:24 +01:00
|
|
|
'required' => 1,
|
|
|
|
'rights' => array(
|
|
|
|
'self' => 'w',
|
|
|
|
'admin' => 'w'
|
|
|
|
),
|
|
|
|
'dependAttrs' => array(
|
|
|
|
'sambaLMPassword',
|
|
|
|
'sambaNTPassword'
|
2008-02-05 17:11:21 +01:00
|
|
|
),
|
|
|
|
'form' => array (
|
2008-02-12 18:59:44 +01:00
|
|
|
'modify' => 1,
|
2008-06-05 15:21:18 +02:00
|
|
|
'create' => 1,
|
|
|
|
'lostPassword' => 1
|
2008-10-14 13:58:00 +02:00
|
|
|
),
|
|
|
|
'after_modify' => 'valid'
|
2008-06-05 15:21:18 +02:00
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-06-05 15:21:18 +02:00
|
|
|
'lsRecoveryHash' => array (
|
|
|
|
'label' => _('Hash de recouvrement du mot de passe'),
|
|
|
|
'ldap_type' => 'ascii',
|
|
|
|
'html_type' => 'text',
|
|
|
|
'required' => 0,
|
|
|
|
'form' => array (
|
|
|
|
'lostPassword' => 1
|
|
|
|
),
|
|
|
|
'rights' => array(
|
|
|
|
'self' => 'w',
|
|
|
|
'admin' => 'w'
|
2008-02-05 17:11:21 +01:00
|
|
|
)
|
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-02-05 17:11:21 +01:00
|
|
|
'sambaLMPassword' => array (
|
|
|
|
'label' => _('Mot de passe Samba (LM)'),
|
|
|
|
'ldap_type' => 'ascii',
|
2008-02-12 18:59:44 +01:00
|
|
|
'html_type' => 'text',
|
2008-02-08 18:39:24 +01:00
|
|
|
'required' => 1,
|
2008-02-12 18:59:44 +01:00
|
|
|
'generate_function' => 'generate_sambaLMPassword',
|
|
|
|
'form' => array (
|
|
|
|
'modify' => 0
|
|
|
|
)
|
2008-02-08 18:39:24 +01:00
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-02-05 17:11:21 +01:00
|
|
|
'sambaNTPassword' => array (
|
|
|
|
'label' => _('Mot de passe Samba (NT)'),
|
|
|
|
'ldap_type' => 'ascii',
|
2008-02-12 18:59:44 +01:00
|
|
|
'html_type' => 'text',
|
2008-02-08 18:39:24 +01:00
|
|
|
'required' => 1,
|
2008-02-12 18:59:44 +01:00
|
|
|
'generate_function' => 'generate_sambaNTPassword',
|
|
|
|
'form' => array (
|
|
|
|
'modify' => 0
|
|
|
|
)
|
2008-02-26 18:40:05 +01:00
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
2008-02-26 18:40:05 +01:00
|
|
|
'jpegPhoto' => array (
|
|
|
|
'label' => _('Photo'),
|
|
|
|
'ldap_type' => 'image',
|
|
|
|
'html_type' => 'image',
|
|
|
|
'required' => 0,
|
|
|
|
'view' => 0,
|
|
|
|
'check_data' => array (
|
|
|
|
'imagesize' => array(
|
|
|
|
'msg' => _("La taille de l'image n'est pas valide."),
|
2008-10-07 17:16:33 +02:00
|
|
|
'params' => array(
|
2008-02-26 18:40:05 +01:00
|
|
|
'maxWidth' => 2000
|
|
|
|
)
|
|
|
|
),
|
|
|
|
'imagefilesize' => array(
|
|
|
|
'msg' => _("La taille du fichier image n'est pas valide."),
|
2008-10-07 17:16:33 +02:00
|
|
|
'params' => array(
|
2008-02-26 18:40:05 +01:00
|
|
|
'maxSize' => 3000000 // taille du fichier en octets
|
|
|
|
)
|
|
|
|
),
|
|
|
|
'imagefile' => array(
|
|
|
|
'msg' => _("Le type du fichier n'est pas valide.")
|
|
|
|
)
|
|
|
|
),
|
|
|
|
'form' => array (
|
|
|
|
'modify' => 1
|
|
|
|
),
|
|
|
|
'rights' => array(
|
|
|
|
'self' => 'w',
|
|
|
|
'user' => 'r',
|
2008-11-12 17:57:40 +01:00
|
|
|
'admin' => 'w',
|
|
|
|
'godfather' => 'w'
|
|
|
|
)
|
|
|
|
),
|
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
/* ----------- start -----------*/
|
|
|
|
'lsGodfatherDn' => array (
|
|
|
|
'label' => _('Parrain(s)'),
|
|
|
|
'ldap_type' => 'ascii',
|
|
|
|
'html_type' => 'select_object',
|
2009-01-28 09:13:36 +01:00
|
|
|
'html_options' => array (
|
|
|
|
'selectable_object' => array(
|
|
|
|
'object_type' => 'LSeepeople',
|
|
|
|
'value_attribute' => '%{dn}'
|
|
|
|
),
|
2008-11-12 17:57:40 +01:00
|
|
|
),
|
|
|
|
'validation' => array (
|
|
|
|
array (
|
|
|
|
'basedn' => '%{val}',
|
|
|
|
'result' => 1,
|
|
|
|
'msg' => _("Un ou plusieurs de ces utilisateurs n'existent pas.")
|
|
|
|
)
|
|
|
|
),
|
|
|
|
'multiple' => 1,
|
|
|
|
'rights' => array(
|
2008-02-26 18:40:05 +01:00
|
|
|
'admin' => 'w'
|
2008-11-12 17:57:40 +01:00
|
|
|
),
|
|
|
|
'view' => 1,
|
|
|
|
'form' => array (
|
|
|
|
'modify' => 1,
|
|
|
|
'create' => 1
|
2008-02-26 18:40:05 +01:00
|
|
|
)
|
2008-11-12 17:57:40 +01:00
|
|
|
),
|
2008-11-03 20:25:22 +01:00
|
|
|
/* ----------- end -----------*/
|
|
|
|
|
|
|
|
) // Fin args
|
2008-02-05 17:11:21 +01:00
|
|
|
);
|
|
|
|
?>
|