diff --git a/src/includes/class/class.LSldap.php b/src/includes/class/class.LSldap.php index 11870228..9f67cbe4 100644 --- a/src/includes/class/class.LSldap.php +++ b/src/includes/class/class.LSldap.php @@ -51,6 +51,14 @@ class LSldap extends LSlog_staticLoggerClass { */ private static $cnx = NULL; + /** + * Registered events + * @see self::addEvent() + * @see self::fireEvent() + * @var array + */ + private static $_events = array(); + /** * Set configuration * @@ -81,12 +89,16 @@ class LSldap extends LSlog_staticLoggerClass { if ($config) { self :: setConfig($config); } + if (!self :: fireEvent('connecting')) + return false; self :: $cnx = Net_LDAP2::connect(self :: $config); if (Net_LDAP2::isError(self :: $cnx)) { + self :: fireEvent('connection_failure', array('error' => self :: $cnx -> getMessage())); LSerror :: addErrorCode('LSldap_01',self :: $cnx -> getMessage()); self :: $cnx = NULL; return false; } + self :: fireEvent('connected'); return true; } @@ -112,12 +124,19 @@ class LSldap extends LSlog_staticLoggerClass { $config = self :: $config; $config['binddn'] = $dn; $config['bindpw'] = $pwd; + if (!self :: fireEvent('reconnecting', array('dn' => $dn))) + return false; self :: $cnx = Net_LDAP2::connect($config); if (Net_LDAP2::isError(self :: $cnx)) { + self :: fireEvent( + 'reconnection_failure', + array('dn' => $dn, 'error' => self :: $cnx -> getMessage()) + ); LSerror :: addErrorCode('LSldap_01', self :: $cnx -> getMessage()); self :: $cnx = NULL; return false; } + self :: fireEvent('reconnected', array('dn' => $dn)); return true; } @@ -134,6 +153,8 @@ class LSldap extends LSlog_staticLoggerClass { if (!self :: $cnx) { self :: connect(); } + if (!self :: fireEvent('setting_authz_proxy', array('dn' => $dn))) + return false; $result = self :: $cnx -> setOption( 'LDAP_OPT_SERVER_CONTROLS', array ( @@ -147,9 +168,11 @@ class LSldap extends LSlog_staticLoggerClass { // Also check user exists to validate the connection with // authz proxy control. if ($result !== True || !self :: exists($dn)) { + self :: fireEvent('setting_authz_proxy_failure', array('dn' => $dn)); LSerror :: addErrorCode('LSldap_09'); return False; } + self :: fireEvent('set_authz_proxy', array('dn' => $dn)); return True; } @@ -163,8 +186,11 @@ class LSldap extends LSlog_staticLoggerClass { * @return void */ public static function close() { + if (!self :: fireEvent('closing')) + return; self :: $cnx -> done(); self :: $cnx = null; + self :: fireEvent('closed'); } /** @@ -457,12 +483,12 @@ class LSldap extends LSlog_staticLoggerClass { * * @param string $object_type The object type * @param string $dn DN of the LDAP object - * @param array $change Array of object attributes changes + * @param array $changes Array of object attributes changes * * @return boolean True if object was updated, False otherwise. */ - public static function update($object_type, $dn, $change) { - self :: log_trace("update($object_type, $dn): change=".varDump($change)); + public static function update($object_type, $dn, $changes) { + self :: log_trace("update($object_type, $dn): change=".varDump($changes)); // Retrieve current LDAP entry $entry = self :: getEntry($object_type, $dn); @@ -471,10 +497,18 @@ class LSldap extends LSlog_staticLoggerClass { return false; } + if ( + !self :: fireEvent( + 'updating', + array('object_type' => $object_type, 'dn' => $dn, 'entry' => &$entry, 'changes' => $changes) + ) + ) + return false; + // Distinguish drop attributes from change attributes $changed_attrs = array(); $dropped_attrs = array(); - foreach($change as $attrName => $attrVal) { + foreach($changes as $attrName => $attrVal) { $drop = true; if (is_array($attrVal)) { foreach($attrVal as $val) { @@ -508,6 +542,9 @@ class LSldap extends LSlog_staticLoggerClass { } } + // Keep original entry (to provide to hooks) + $original_entry = clone $entry; + // Handle attributes changes (if need) if ($changed_attrs) { @@ -522,10 +559,26 @@ class LSldap extends LSlog_staticLoggerClass { } if (Net_LDAP2::isError($ret)) { + self :: fireEvent( + 'update_failure', + array( + 'object_type' => $object_type, 'dn' => $dn, + 'original_entry' => &$original_entry, 'entry' => &$entry, + 'changes' => $changed_attrs, 'error' => $ret->getMessage() + ) + ); LSerror :: addErrorCode('LSldap_05',$dn); LSerror :: addErrorCode(0,'NetLdap-Error : '.$ret->getMessage()); return false; } + self :: fireEvent( + 'updated', + array( + 'object_type' => $object_type, 'dn' => $dn, + 'original_entry' => &$original_entry, 'entry' => &$entry, + 'changes' => $changed_attrs + ) + ); } elseif ($entry -> isNew()) { self :: log_error("update($object_type, $dn): no changed attribute but it's a new entry..."); @@ -561,10 +614,26 @@ class LSldap extends LSlog_staticLoggerClass { // Check result if (Net_LDAP2::isError($ret)) { + self :: fireEvent( + 'update_failure', + array( + 'object_type' => $object_type, 'dn' => $dn, + 'original_entry' => &$original_entry, 'entry' => &$entry, + 'changes' => $replace_attrs, 'error' => $ret->getMessage() + ) + ); LSerror :: addErrorCode('LSldap_06'); LSerror :: addErrorCode(0,'NetLdap-Error : '.$ret->getMessage()); return false; } + self :: fireEvent( + 'updated', + array( + 'object_type' => $object_type, 'dn' => $dn, + 'original_entry' => &$original_entry, 'entry' => &$entry, + 'changes' => $replace_attrs + ) + ); } return true; } @@ -607,11 +676,15 @@ class LSldap extends LSlog_staticLoggerClass { * @return boolean True if object was removed, False otherwise. */ public static function remove($dn) { + if (!self :: fireEvent('removing', array('dn' => $dn))) + return false; $ret = self :: $cnx -> delete($dn,array('recursive' => true)); if (Net_LDAP2::isError($ret)) { + self :: fireEvent('remove_failure', array('dn' => $dn, 'error' => $ret->getMessage())); LSerror :: addErrorCode(0,'NetLdap-Error : '.$ret->getMessage()); return false; } + self :: fireEvent('removed', array('dn' => $dn)); return true; } @@ -624,12 +697,19 @@ class LSldap extends LSlog_staticLoggerClass { * @return boolean True if object was moved, False otherwise. */ public static function move($old, $new) { + if (!self :: fireEvent('moving', array('old' => $old, 'new' => $new))) + return false; $ret = self :: $cnx -> move($old, $new); if (Net_LDAP2::isError($ret)) { + self :: fireEvent( + 'move_failure', + array('old' => $old, 'new' => $new, 'error' => $ret->getMessage()) + ); LSerror :: addErrorCode('LSldap_07'); LSerror :: addErrorCode(0,'NetLdap-Error : '.$ret->getMessage()); return false; } + self :: fireEvent('moved', array('old' => $old, 'new' => $new)); return true; } @@ -721,22 +801,63 @@ class LSldap extends LSlog_staticLoggerClass { _('It is too soon to change the password'), _('This password was recently used and cannot be used again'), ); - self :: log_debug("update($object_type, $dn): update entry for userPassword"); + self :: log_debug("updateUserPassword($object_type, $dn): update entry userPassword attribute"); + $changes = array('userPassword' => self :: getAttr($changed_attrs, 'userPassword', true)); + + if ( + !self :: fireEvent( + 'user_password_updating', + array( + 'object_type' => $object_type, 'dn' => $dn, + 'new_passwords' => $changes['userPassword'] + ) + ) + ) + return false; + $ldap = self :: $cnx->getLink(); - $attr = array('userPassword' => self :: getAttr($changed_attrs, 'userPassword')); $ctrlRequest = array(array('oid' => LDAP_CONTROL_PASSWORDPOLICYREQUEST)); - $r = ldap_mod_replace_ext($ldap, $dn, $attr, $ctrlRequest); + $r = ldap_mod_replace_ext($ldap, $dn, $changes, $ctrlRequest); if ($r && ldap_parse_result($ldap, $r, $errcode, $matcheddn, $errmsg, $ref, $ctrlResponse)) { if ($errcode !== 0 && isset($ctrlResponse[LDAP_CONTROL_PASSWORDPOLICYRESPONSE])) { - LSerror :: addErrorCode('LSldap_10', $ppolicyErrorMsg[$ctrlResponse[LDAP_CONTROL_PASSWORDPOLICYRESPONSE]['value']['error']]); + self :: fireEvent( + 'user_password_update_failure', + array( + 'object_type' => $object_type, 'dn' => $dn, + 'error' => $ppolicyErrorMsg[ + $ctrlResponse[LDAP_CONTROL_PASSWORDPOLICYRESPONSE]['value']['error'] + ] + ) + ); + LSerror :: addErrorCode( + 'LSldap_10', + $ppolicyErrorMsg[$ctrlResponse[LDAP_CONTROL_PASSWORDPOLICYRESPONSE]['value']['error']] + ); return false; } - // If everything OK, remove userPassword to prevent it from being processed by Net_LDAP2 + // Password updated + self :: fireEvent( + 'user_password_updated', + array( + 'object_type' => $object_type, 'dn' => $dn, + 'new_passwords' => $changes['userPassword'] + ) + ); + // Remove userPassword to prevent it from being processed by update() unset($changed_attrs['userPassword']); - } else { + } + else { + self :: fireEvent( + 'user_password_update_failure', + array( + 'object_type' => $object_type, 'dn' => $dn, + 'error' => ldap_errno($ldap) !== 0?ldap_error($ldap):'unknown' + ) + ); if (ldap_errno($ldap) !== 0) { LSerror :: addErrorCode('LSldap_10', ldap_error($ldap)); - } else { + } + else { LSerror :: addErrorCode('LSldap_11'); } return false; @@ -756,6 +877,66 @@ class LSldap extends LSlog_staticLoggerClass { private static function getConfig($param, $default=null, $cast=null) { return LSconfig :: get($param, $default, $cast, self :: $config); } + + /** + * Registered an action on a specific event + * + * @param string $event The event name + * @param callable $callable The callable to run on event + * @param array $params Paremeters that will be pass to the callable + * + * @return void + */ + public static function addEvent($event, $callable, $params=NULL) { + self :: $_events[$event][] = array( + 'callable' => $callable, + 'params' => is_array($params)?$params:array(), + ); + } + + /** + * Run triggered actions on specific event + * + * @param string $event Event name + * @param mixed $data Event data + * + * @return boolean True if all triggered actions succefully runned, false otherwise + */ + public static function fireEvent($event, $data=null) { + $return = true; + + // Binding via addEvent + if (isset(self :: $_events[$event]) && is_array(self :: $_events[$event])) { + foreach (self :: $_events[$event] as $e) { + if (is_callable($e['callable'])) { + try { + call_user_func_array( + $e['callable'], + array_merge( + array($data), $e['params'] + ) + ); + } + catch(Exception $er) { + LSerror :: addErrorCode( + 'LSldap_13', + array('callable' => format_callable($e['callable']), 'event' => $event) + ); + $return = false; + } + } + else { + LSerror :: addErrorCode( + 'LSldap_12', + array('callable' => format_callable($e['callable']), 'event' => $event) + ); + $return = false; + } + } + } + + return $return; + } } /* @@ -794,3 +975,9 @@ LSerror :: defineError('LSldap_10', LSerror :: defineError('LSldap_11', ___("LSldap: Unknown LDAP error while updating user password") ); +LSerror :: defineError('LSldap_12', + ___("LSldap: Fail to execute trigger %{callable} on event %{event} : is not callable.") +); +LSerror :: defineError('LSldap_13', + ___("LSldap: Error during the execution of the trigger %{callable} on event %{event}.") +); diff --git a/src/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.mo b/src/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.mo index f9f6f0fe..ae7daf4a 100644 Binary files a/src/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.mo and b/src/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.mo differ diff --git a/src/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.po b/src/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.po index 981d8887..be9c2441 100644 --- a/src/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.po +++ b/src/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: LdapSaisie\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2023-01-11 19:45+0100\n" +"PO-Revision-Date: 2023-03-20 16:10+0100\n" "Last-Translator: Benjamin Renard \n" "Language-Team: LdapSaisie \n" @@ -472,15 +472,15 @@ msgstr "SUPANN : Cette entité a des entités filles et ne peut être supprimée msgid "SUPANN: Fail to load nomenclature %{nomenclature}." msgstr "SUPANN : Erreur de chargement de la nomenclature %{nomenclature}." -#: includes/addons/LSaddons.supann.php:376 +#: includes/addons/LSaddons.supann.php:447 msgid "Entity %{id} (unrecognized)" msgstr "Entité %{id} (non-reconnue)" -#: includes/addons/LSaddons.supann.php:448 +#: includes/addons/LSaddons.supann.php:519 msgid "Godfather %{dn} (unrecognized)" msgstr "Parrain %{dn} (non-reconnue)" -#: includes/addons/LSaddons.supann.php:575 +#: includes/addons/LSaddons.supann.php:646 #: includes/class/class.LSformElement_select.php:58 #: includes/class/class.LSformElement_select_object.php:108 msgid "%{value} (unrecognized value)" @@ -625,10 +625,6 @@ msgstr "" "MAILDIR : Erreur durant la récupération du chemin distant du dossier des " "mails." -#: includes/addons/LSaddons.watermark.php:78 -msgid "PRE-PRODUCTION" -msgstr "PRÉ-PRODUCTION" - #: includes/addons/LSaddons.showTechInfo.php:63 #: templates/default/showTechInfo.tpl:16 msgid "Structural object class" @@ -1518,25 +1514,25 @@ msgstr "" msgid "Invalid file type (%{type})." msgstr "Type de fichier invalide (%{type})." -#: includes/class/class.LSldapObject.php:566 +#: includes/class/class.LSldapObject.php:577 msgid "The attribute %{attr} is not valid." msgstr "L'attribut %{attr} n'est pas valide." -#: includes/class/class.LSldapObject.php:3139 +#: includes/class/class.LSldapObject.php:3150 msgid "LSldapObject : Object type unknown." msgstr "LSldapObject : Type d'objet inconnu." -#: includes/class/class.LSldapObject.php:3142 +#: includes/class/class.LSldapObject.php:3153 msgid "LSldapObject : Update form is not defined for the object %{obj}." msgstr "" "LSldapObject : Le formulaire de mise à jour n'est pas défini pour l'objet " "%{obj}." -#: includes/class/class.LSldapObject.php:3145 +#: includes/class/class.LSldapObject.php:3156 msgid "LSldapObject : No form exists for the object %{obj}." msgstr "LSldapObject : Aucun formulaire n'existe pour l'objet %{obj}" -#: includes/class/class.LSldapObject.php:3148 +#: includes/class/class.LSldapObject.php:3159 msgid "" "LSldapObject : The function %{func} to validate the attribute %{attr} the " "object %{obj} is unknow." @@ -1544,7 +1540,7 @@ msgstr "" "LSldapObject : La fonction %{func} pour valider l'attribut %{attr} de " "l'objet %{obj} est inconnue." -#: includes/class/class.LSldapObject.php:3151 +#: includes/class/class.LSldapObject.php:3162 msgid "" "LSldapObject : Configuration data are missing to validate the attribute " "%{attr} of the object %{obj}." @@ -1552,7 +1548,7 @@ msgstr "" "LSldapObject : Des données de configurations sont manquantes pour pouvoir " "valider l'attribut %{attr} de l'objet %{obj}." -#: includes/class/class.LSldapObject.php:3155 +#: includes/class/class.LSldapObject.php:3166 msgid "" "LSldapObject : The function %{func} to be executed on the object event " "%{event} doesn't exist." @@ -1560,14 +1556,14 @@ msgstr "" "LSldapObject : La fonction %{func} devant être exécutée lors de l'évènement " "%{event} de l'objet n'existe pas." -#: includes/class/class.LSldapObject.php:3158 +#: includes/class/class.LSldapObject.php:3169 msgid "" "LSldapObject : The %{func} execution on the object event %{event} failed." msgstr "" "LSldapObject : L'exécution de la fonction %{func} lors de l'évènement " "%{event} de l'objet a échouée." -#: includes/class/class.LSldapObject.php:3162 +#: includes/class/class.LSldapObject.php:3173 msgid "" "LSldapObject : Class %{class}, which method %{meth} to be executed on the " "object event %{event}, doesn't exist." @@ -1575,7 +1571,7 @@ msgstr "" "La classe %{class}, contenant la méthode %{meth} devant être exécutée lors " "de l'évènement %{event} de l'objet, n'existe pas." -#: includes/class/class.LSldapObject.php:3165 +#: includes/class/class.LSldapObject.php:3176 msgid "" "LSldapObject : Method %{meth} within %{class} class to be executed on object " "event %{event}, doesn't exist." @@ -1583,7 +1579,7 @@ msgstr "" "LSldapObject : La méthode %{meth} de la classe %{class} devant être exécutée " "lors de l'évènement %{event} de l'objet n'existe pas." -#: includes/class/class.LSldapObject.php:3168 +#: includes/class/class.LSldapObject.php:3179 msgid "" "LSldapObject : Error during execute %{meth} method within %{class} class, to " "be executed on object event %{event}." @@ -1591,7 +1587,7 @@ msgstr "" "LSldapObject : Erreur durant l'exécution de la méthode %{meth} de la classe " "%{class} devant être exécutée lors de l'évènement %{event} de l'objet." -#: includes/class/class.LSldapObject.php:3172 +#: includes/class/class.LSldapObject.php:3183 msgid "" "LSldapObject : Some configuration data of the object type %{obj} are missing " "to generate the DN of the new object." @@ -1599,7 +1595,7 @@ msgstr "" "LSldapObject : Des informations de configuration du type d'objet %{obj} sont " "manquantes pour la génération du DN du nouvel objet." -#: includes/class/class.LSldapObject.php:3175 +#: includes/class/class.LSldapObject.php:3186 msgid "" "LSldapObject : The attibute %{attr} of the object is not yet defined. Can't " "generate DN." @@ -1607,11 +1603,11 @@ msgstr "" "LSldapObject : L'attribut %{attr} de l'objet n'est pas encore défini. " "Impossible de générer le DN." -#: includes/class/class.LSldapObject.php:3178 +#: includes/class/class.LSldapObject.php:3189 msgid "LSldapObject : Without DN, the object could not be changed." msgstr "LSldapObject : Sans DN, l'objet ne peut pas être modifié." -#: includes/class/class.LSldapObject.php:3181 +#: includes/class/class.LSldapObject.php:3192 msgid "" "LSldapObject : The attribute %{attr_depend} depending on the attribute " "%{attr} doesn't exist." @@ -1619,39 +1615,39 @@ msgstr "" "LSldapObject : L'attritbut %{attr_depend} dépendant de l'attribut %{attr} " "n'existe pas." -#: includes/class/class.LSldapObject.php:3184 +#: includes/class/class.LSldapObject.php:3195 msgid "LSldapObject : Error during deleting the object %{objectname}." msgstr "LSldapObject : Erreur durant la suppression de l'objet %{objectname}" -#: includes/class/class.LSldapObject.php:3188 +#: includes/class/class.LSldapObject.php:3199 msgid "" "LSldapObject : Error during actions to be executed before renaming the objet." msgstr "" "LSldapObject : Erreur durant les actions devant être exécutée avant de " "renommer l'objet." -#: includes/class/class.LSldapObject.php:3191 +#: includes/class/class.LSldapObject.php:3202 msgid "" "LSldapObject : Error during actions to be executed after renaming the objet." msgstr "" "LSldapObject : Erreur durant les actions devant être exécutée après avoir " "renommé l'objet." -#: includes/class/class.LSldapObject.php:3195 +#: includes/class/class.LSldapObject.php:3206 msgid "" "LSldapObject : Error during actions to be executed before deleting the objet." msgstr "" "LSldapObject : Erreur durant les actions devant être exécutée avant de " "supprimer l'objet." -#: includes/class/class.LSldapObject.php:3198 +#: includes/class/class.LSldapObject.php:3209 msgid "" "LSldapObject : Error during actions to be executed after deleting the objet." msgstr "" "LSldapObject : Erreur durant les actions devant être exécutée après avoir " "supprimé l'objet." -#: includes/class/class.LSldapObject.php:3202 +#: includes/class/class.LSldapObject.php:3213 msgid "" "LSldapObject : Error during the actions to be executed before creating the " "object." @@ -1659,7 +1655,7 @@ msgstr "" "LSldapObject : Erreur durant les actions devant être exécutée avant de créer " "l'objet." -#: includes/class/class.LSldapObject.php:3205 +#: includes/class/class.LSldapObject.php:3216 msgid "" "LSldapObject : Error during the actions to be executed after creating the " "object. It was created anyway." @@ -1667,7 +1663,7 @@ msgstr "" "LSldapObject : Erreur durant les actions devant être exécutées après la " "création de l'objet. Il a tout de même été créé." -#: includes/class/class.LSldapObject.php:3209 +#: includes/class/class.LSldapObject.php:3220 msgid "" "LSldapObject : The function %{func} to be executed before creating the " "object doesn't exist." @@ -1675,7 +1671,7 @@ msgstr "" "LSldapObject : La fonction %{func} devant être exécutée avant la création de " "l'objet n'existe pas." -#: includes/class/class.LSldapObject.php:3212 +#: includes/class/class.LSldapObject.php:3223 msgid "" "LSldapObject : Error executing the function %{func} to be execute after " "deleting the object." @@ -1683,7 +1679,7 @@ msgstr "" "LSldapObject : Erreur durant l'exécution de la fonction %{func} devant être " "exécutée après la suppression de l'objet." -#: includes/class/class.LSldapObject.php:3215 +#: includes/class/class.LSldapObject.php:3226 msgid "" "LSldapObject : The function %{func} to be executed after deleting the object " "doesn't exist." @@ -1691,7 +1687,7 @@ msgstr "" "LSldapObject : La fonction %{func} devant être exécutée après la suppression " "de l'objet n'existe pas." -#: includes/class/class.LSldapObject.php:3218 +#: includes/class/class.LSldapObject.php:3229 msgid "" "LSldapObject : Error executing the function %{func} to be execute after " "creating the object." @@ -1699,7 +1695,7 @@ msgstr "" "LSldapObject : Erreur durant l'exécution de la fonction %{func} devant être " "exécutée après la création de l'objet." -#: includes/class/class.LSldapObject.php:3222 +#: includes/class/class.LSldapObject.php:3233 msgid "" "LSldapObject : %{func} function, to be executed on object event %{event}, " "doesn't exist." @@ -1707,7 +1703,7 @@ msgstr "" "LSldapObject : La fonction %{func}, devant être exécutée lors de l'évènement " "%{event} de l'objet, n'existe pas." -#: includes/class/class.LSldapObject.php:3225 +#: includes/class/class.LSldapObject.php:3236 msgid "" "LSldapObject : Error during the execution of %{func} function on object " "event %{event}." @@ -1715,7 +1711,7 @@ msgstr "" "LSldapObject : Erreur durant l'exécution de la fonction %{func} lors de " "l'évènement %{event} de l'objet." -#: includes/class/class.LSldapObject.php:3229 +#: includes/class/class.LSldapObject.php:3240 msgid "" "LSldapObject : %{meth} method, to be executed on object event %{event}, " "doesn't exist." @@ -1723,7 +1719,7 @@ msgstr "" "LSldapObject : La méthode %{meth}, devant être exécutée lors de l'évènement " "%{event} de l'objet, n'existe pas." -#: includes/class/class.LSldapObject.php:3232 +#: includes/class/class.LSldapObject.php:3243 msgid "" "LSldapObject : Error during execution of %{meth} method on object event " "%{event}." @@ -1731,13 +1727,13 @@ msgstr "" "LSldapObject : Erreur durant l'exécution de la méthode %{meth} lors de " "l'évènement %{event} de l'objet." -#: includes/class/class.LSldapObject.php:3235 +#: includes/class/class.LSldapObject.php:3246 msgid "LSldapObject : Error during generate LDAP filter for %{LSobject}." msgstr "" "LSldapObject : Erreur durant la génération du filtre LDAP de l'objet " "%{LSobject}." -#: includes/class/class.LSldapObject.php:3239 +#: includes/class/class.LSldapObject.php:3250 msgid "" "LSldapObject : Error during execution of the custom action %{customAction} " "on %{objectname}." @@ -1745,22 +1741,22 @@ msgstr "" "LSldapObject : Erreur durant l'exécution de l'action personnalisée " "%{customAction} sur l'objet %{objectname}." -#: includes/class/class.LSldapObject.php:3243 +#: includes/class/class.LSldapObject.php:3254 msgid "LSldapObject : Fail to retrieve container DN." msgstr "LSldapObject : Impossible de récupérer le DN parent." -#: includes/class/class.LSldapObject.php:3246 +#: includes/class/class.LSldapObject.php:3257 msgid "" "LSldapObject : The function %{func} to generate container DN is not callable." msgstr "" "LSldapObject : La fonction %{func} pour générer le DN parent n'est pas " "exécutable." -#: includes/class/class.LSldapObject.php:3249 +#: includes/class/class.LSldapObject.php:3260 msgid "LSldapObject : Error during generating container DN : %{error}" msgstr "LSldapObject : Erreur durant la génération du DN parent : %{error}." -#: includes/class/class.LSldapObject.php:3252 +#: includes/class/class.LSldapObject.php:3263 msgid "" "LSldapObject : An LDAP object with the same DN as generated for this new one " "already exists. Please verify your configuration." @@ -1768,7 +1764,7 @@ msgstr "" "LSldapObject : Un objet LDAP avec le même DN que celui généré pour ce nouvel " "objet existe déjà. Merci de vérifier votre configuration." -#: includes/class/class.LSldapObject.php:3257 +#: includes/class/class.LSldapObject.php:3268 msgid "" "LSrelation : Some parameters are missing in the call of methods to handle " "standard relations (Method : %{meth})." @@ -1804,92 +1800,108 @@ msgstr "" "LSformRule_password : Regex invalide configurée : %{regex}. Vous devez " "utiliser des regex de type PCRE (commencant par le caractère '/')." -#: includes/class/class.LSldap.php:713 +#: includes/class/class.LSldap.php:783 msgid "The password expired" msgstr "Le mot de passe a expiré" -#: includes/class/class.LSldap.php:714 +#: includes/class/class.LSldap.php:784 msgid "The account is locked" msgstr "Ce compte est bloqué" -#: includes/class/class.LSldap.php:715 +#: includes/class/class.LSldap.php:785 msgid "The password was reset and must be changed" msgstr "Le mot de passe a été réinitialisé et doit être changé" -#: includes/class/class.LSldap.php:716 +#: includes/class/class.LSldap.php:786 msgid "It is not possible to modify the password" msgstr "Il n'est pas possible de modifier le mot de passe" -#: includes/class/class.LSldap.php:717 +#: includes/class/class.LSldap.php:787 msgid "The old password must be supplied" msgstr "L'ancien mot de passe doit être fourni" -#: includes/class/class.LSldap.php:718 +#: includes/class/class.LSldap.php:788 msgid "The password does not meet the quality requirements" msgstr "Le mot de passe ne répond pas aux exigences de qualité" -#: includes/class/class.LSldap.php:719 +#: includes/class/class.LSldap.php:789 msgid "The password is too short" msgstr "Le mot de passe est trop court" -#: includes/class/class.LSldap.php:720 +#: includes/class/class.LSldap.php:790 msgid "It is too soon to change the password" msgstr "Il est trop tôt pour modifier le mot de passe" -#: includes/class/class.LSldap.php:721 +#: includes/class/class.LSldap.php:791 msgid "This password was recently used and cannot be used again" msgstr "" "Ce mot de passe a été utilisé récemment et il ne peut être utilisé à nouveau" -#: includes/class/class.LSldap.php:764 +#: includes/class/class.LSldap.php:911 msgid "LSldap: Error during the LDAP server connection (%{msg})." msgstr "LSldap : Erreur durant la connexion au serveur LDAP (%{msg})." -#: includes/class/class.LSldap.php:767 +#: includes/class/class.LSldap.php:914 msgid "LSldap: Error during the LDAP search (%{msg})." msgstr "LSldap : Erreur pendant la recherche LDAP (%{msg})." -#: includes/class/class.LSldap.php:770 +#: includes/class/class.LSldap.php:917 msgid "LSldap: Object type unknown." msgstr "LSldap : Type d'objet inconnu." -#: includes/class/class.LSldap.php:773 +#: includes/class/class.LSldap.php:920 msgid "LSldap: Error while fetching the LDAP entry." msgstr "LSldap : Erreur durant la récupération de l'entrée LDAP." -#: includes/class/class.LSldap.php:776 +#: includes/class/class.LSldap.php:923 msgid "LSldap: Error while changing the LDAP entry (DN : %{dn})." msgstr "LSldap : Erreur durant la modification de l'entrée LDAP (DN : %{dn})." -#: includes/class/class.LSldap.php:779 +#: includes/class/class.LSldap.php:926 msgid "LSldap: Error while deleting empty attributes." msgstr "LSldap : Erreur durant la suppression des attributs vides." -#: includes/class/class.LSldap.php:782 +#: includes/class/class.LSldap.php:929 msgid "LSldap: Error while changing the DN of the object." msgstr "LSldap : Erreur pendant la modification du DN de l'objet." -#: includes/class/class.LSldap.php:785 +#: includes/class/class.LSldap.php:932 msgid "LSldap: LDAP server base DN not configured." msgstr "LSldap : Le base DN du serveur LDAP n'est pas configuré." -#: includes/class/class.LSldap.php:788 +#: includes/class/class.LSldap.php:935 msgid "LSldap: Fail to set authz proxy option on LDAP server connection." msgstr "" "LSldap : Une erreur est survenue en appliquant l'option d'authz proxy sur la " "connexion au serveur LDAP." -#: includes/class/class.LSldap.php:791 +#: includes/class/class.LSldap.php:938 msgid "LSldap: Error while changing the user password: %{msg}." msgstr "" "LSldap: Erreur durant la modification du mot de passe utilisateur: %{msg}." -#: includes/class/class.LSldap.php:794 +#: includes/class/class.LSldap.php:941 msgid "LSldap: Unknown LDAP error while updating user password" msgstr "" "LSldap: Une erreur LDAP inconnue est survenue pendant la modification du mot " "de passe utilisateur" +#: includes/class/class.LSldap.php:944 +msgid "" +"LSldap: Fail to execute trigger %{callable} on event %{event} : is not " +"callable." +msgstr "" +"LSldap : Échec d'exécution du déclencheur %{callable} lors de événement " +"%{event} : il n'est pas un callable." + +#: includes/class/class.LSldap.php:947 +msgid "" +"LSldap: Error during the execution of the trigger %{callable} on event " +"%{event}." +msgstr "" +"LSldap : Erreur durant l'exécution du déclencheur %{callable} lors de " +"l'événement %{event}." + #: includes/class/class.LSformRule_ldapSearchURI.php:59 msgid "Invalid LDAP server URI (%{uri})" msgstr "URI de serveur LDAP invalide (%{uri})" @@ -3374,6 +3386,9 @@ msgstr "non" msgid "yes" msgstr "oui" +#~ msgid "PRE-PRODUCTION" +#~ msgstr "PRÉ-PRODUCTION" + #~ msgid "" #~ "SAMBA Support: The attribute %{dependency} is missing. Unable to forge " #~ "the attribute %{attr}." diff --git a/src/lang/ldapsaisie.pot b/src/lang/ldapsaisie.pot index e6f57359..2ed6d9c3 100644 --- a/src/lang/ldapsaisie.pot +++ b/src/lang/ldapsaisie.pot @@ -390,15 +390,15 @@ msgstr "" msgid "SUPANN: Fail to load nomenclature %{nomenclature}." msgstr "" -#: includes/addons/LSaddons.supann.php:376 +#: includes/addons/LSaddons.supann.php:447 msgid "Entity %{id} (unrecognized)" msgstr "" -#: includes/addons/LSaddons.supann.php:448 +#: includes/addons/LSaddons.supann.php:519 msgid "Godfather %{dn} (unrecognized)" msgstr "" -#: includes/addons/LSaddons.supann.php:575 +#: includes/addons/LSaddons.supann.php:646 #: includes/class/class.LSformElement_select.php:58 #: includes/class/class.LSformElement_select_object.php:108 msgid "%{value} (unrecognized value)" @@ -519,10 +519,6 @@ msgstr "" msgid "MAILDIR : Error retrieving remote path of the maildir." msgstr "" -#: includes/addons/LSaddons.watermark.php:78 -msgid "PRE-PRODUCTION" -msgstr "" - #: includes/addons/LSaddons.showTechInfo.php:63 #: templates/default/showTechInfo.tpl:16 msgid "Structural object class" @@ -1294,199 +1290,199 @@ msgstr "" msgid "Invalid file type (%{type})." msgstr "" -#: includes/class/class.LSldapObject.php:566 +#: includes/class/class.LSldapObject.php:577 msgid "The attribute %{attr} is not valid." msgstr "" -#: includes/class/class.LSldapObject.php:3139 +#: includes/class/class.LSldapObject.php:3150 msgid "LSldapObject : Object type unknown." msgstr "" -#: includes/class/class.LSldapObject.php:3142 +#: includes/class/class.LSldapObject.php:3153 msgid "LSldapObject : Update form is not defined for the object %{obj}." msgstr "" -#: includes/class/class.LSldapObject.php:3145 +#: includes/class/class.LSldapObject.php:3156 msgid "LSldapObject : No form exists for the object %{obj}." msgstr "" -#: includes/class/class.LSldapObject.php:3148 +#: includes/class/class.LSldapObject.php:3159 msgid "" "LSldapObject : The function %{func} to validate the attribute %{attr} the " "object %{obj} is unknow." msgstr "" -#: includes/class/class.LSldapObject.php:3151 +#: includes/class/class.LSldapObject.php:3162 msgid "" "LSldapObject : Configuration data are missing to validate the attribute " "%{attr} of the object %{obj}." msgstr "" -#: includes/class/class.LSldapObject.php:3155 +#: includes/class/class.LSldapObject.php:3166 msgid "" "LSldapObject : The function %{func} to be executed on the object event " "%{event} doesn't exist." msgstr "" -#: includes/class/class.LSldapObject.php:3158 +#: includes/class/class.LSldapObject.php:3169 msgid "" "LSldapObject : The %{func} execution on the object event %{event} failed." msgstr "" -#: includes/class/class.LSldapObject.php:3162 +#: includes/class/class.LSldapObject.php:3173 msgid "" "LSldapObject : Class %{class}, which method %{meth} to be executed on the " "object event %{event}, doesn't exist." msgstr "" -#: includes/class/class.LSldapObject.php:3165 +#: includes/class/class.LSldapObject.php:3176 msgid "" "LSldapObject : Method %{meth} within %{class} class to be executed on object " "event %{event}, doesn't exist." msgstr "" -#: includes/class/class.LSldapObject.php:3168 +#: includes/class/class.LSldapObject.php:3179 msgid "" "LSldapObject : Error during execute %{meth} method within %{class} class, to " "be executed on object event %{event}." msgstr "" -#: includes/class/class.LSldapObject.php:3172 +#: includes/class/class.LSldapObject.php:3183 msgid "" "LSldapObject : Some configuration data of the object type %{obj} are missing " "to generate the DN of the new object." msgstr "" -#: includes/class/class.LSldapObject.php:3175 +#: includes/class/class.LSldapObject.php:3186 msgid "" "LSldapObject : The attibute %{attr} of the object is not yet defined. Can't " "generate DN." msgstr "" -#: includes/class/class.LSldapObject.php:3178 +#: includes/class/class.LSldapObject.php:3189 msgid "LSldapObject : Without DN, the object could not be changed." msgstr "" -#: includes/class/class.LSldapObject.php:3181 +#: includes/class/class.LSldapObject.php:3192 msgid "" "LSldapObject : The attribute %{attr_depend} depending on the attribute " "%{attr} doesn't exist." msgstr "" -#: includes/class/class.LSldapObject.php:3184 +#: includes/class/class.LSldapObject.php:3195 msgid "LSldapObject : Error during deleting the object %{objectname}." msgstr "" -#: includes/class/class.LSldapObject.php:3188 +#: includes/class/class.LSldapObject.php:3199 msgid "" "LSldapObject : Error during actions to be executed before renaming the objet." msgstr "" -#: includes/class/class.LSldapObject.php:3191 +#: includes/class/class.LSldapObject.php:3202 msgid "" "LSldapObject : Error during actions to be executed after renaming the objet." msgstr "" -#: includes/class/class.LSldapObject.php:3195 +#: includes/class/class.LSldapObject.php:3206 msgid "" "LSldapObject : Error during actions to be executed before deleting the objet." msgstr "" -#: includes/class/class.LSldapObject.php:3198 +#: includes/class/class.LSldapObject.php:3209 msgid "" "LSldapObject : Error during actions to be executed after deleting the objet." msgstr "" -#: includes/class/class.LSldapObject.php:3202 +#: includes/class/class.LSldapObject.php:3213 msgid "" "LSldapObject : Error during the actions to be executed before creating the " "object." msgstr "" -#: includes/class/class.LSldapObject.php:3205 +#: includes/class/class.LSldapObject.php:3216 msgid "" "LSldapObject : Error during the actions to be executed after creating the " "object. It was created anyway." msgstr "" -#: includes/class/class.LSldapObject.php:3209 +#: includes/class/class.LSldapObject.php:3220 msgid "" "LSldapObject : The function %{func} to be executed before creating the " "object doesn't exist." msgstr "" -#: includes/class/class.LSldapObject.php:3212 +#: includes/class/class.LSldapObject.php:3223 msgid "" "LSldapObject : Error executing the function %{func} to be execute after " "deleting the object." msgstr "" -#: includes/class/class.LSldapObject.php:3215 +#: includes/class/class.LSldapObject.php:3226 msgid "" "LSldapObject : The function %{func} to be executed after deleting the object " "doesn't exist." msgstr "" -#: includes/class/class.LSldapObject.php:3218 +#: includes/class/class.LSldapObject.php:3229 msgid "" "LSldapObject : Error executing the function %{func} to be execute after " "creating the object." msgstr "" -#: includes/class/class.LSldapObject.php:3222 +#: includes/class/class.LSldapObject.php:3233 msgid "" "LSldapObject : %{func} function, to be executed on object event %{event}, " "doesn't exist." msgstr "" -#: includes/class/class.LSldapObject.php:3225 +#: includes/class/class.LSldapObject.php:3236 msgid "" "LSldapObject : Error during the execution of %{func} function on object " "event %{event}." msgstr "" -#: includes/class/class.LSldapObject.php:3229 +#: includes/class/class.LSldapObject.php:3240 msgid "" "LSldapObject : %{meth} method, to be executed on object event %{event}, " "doesn't exist." msgstr "" -#: includes/class/class.LSldapObject.php:3232 +#: includes/class/class.LSldapObject.php:3243 msgid "" "LSldapObject : Error during execution of %{meth} method on object event " "%{event}." msgstr "" -#: includes/class/class.LSldapObject.php:3235 +#: includes/class/class.LSldapObject.php:3246 msgid "LSldapObject : Error during generate LDAP filter for %{LSobject}." msgstr "" -#: includes/class/class.LSldapObject.php:3239 +#: includes/class/class.LSldapObject.php:3250 msgid "" "LSldapObject : Error during execution of the custom action %{customAction} " "on %{objectname}." msgstr "" -#: includes/class/class.LSldapObject.php:3243 +#: includes/class/class.LSldapObject.php:3254 msgid "LSldapObject : Fail to retrieve container DN." msgstr "" -#: includes/class/class.LSldapObject.php:3246 +#: includes/class/class.LSldapObject.php:3257 msgid "" "LSldapObject : The function %{func} to generate container DN is not callable." msgstr "" -#: includes/class/class.LSldapObject.php:3249 +#: includes/class/class.LSldapObject.php:3260 msgid "LSldapObject : Error during generating container DN : %{error}" msgstr "" -#: includes/class/class.LSldapObject.php:3252 +#: includes/class/class.LSldapObject.php:3263 msgid "" "LSldapObject : An LDAP object with the same DN as generated for this new one " "already exists. Please verify your configuration." msgstr "" -#: includes/class/class.LSldapObject.php:3257 +#: includes/class/class.LSldapObject.php:3268 msgid "" "LSrelation : Some parameters are missing in the call of methods to handle " "standard relations (Method : %{meth})." @@ -1516,86 +1512,98 @@ msgid "" "(begining by '/' caracter)." msgstr "" -#: includes/class/class.LSldap.php:713 +#: includes/class/class.LSldap.php:783 msgid "The password expired" msgstr "" -#: includes/class/class.LSldap.php:714 +#: includes/class/class.LSldap.php:784 msgid "The account is locked" msgstr "" -#: includes/class/class.LSldap.php:715 +#: includes/class/class.LSldap.php:785 msgid "The password was reset and must be changed" msgstr "" -#: includes/class/class.LSldap.php:716 +#: includes/class/class.LSldap.php:786 msgid "It is not possible to modify the password" msgstr "" -#: includes/class/class.LSldap.php:717 +#: includes/class/class.LSldap.php:787 msgid "The old password must be supplied" msgstr "" -#: includes/class/class.LSldap.php:718 +#: includes/class/class.LSldap.php:788 msgid "The password does not meet the quality requirements" msgstr "" -#: includes/class/class.LSldap.php:719 +#: includes/class/class.LSldap.php:789 msgid "The password is too short" msgstr "" -#: includes/class/class.LSldap.php:720 +#: includes/class/class.LSldap.php:790 msgid "It is too soon to change the password" msgstr "" -#: includes/class/class.LSldap.php:721 +#: includes/class/class.LSldap.php:791 msgid "This password was recently used and cannot be used again" msgstr "" -#: includes/class/class.LSldap.php:764 +#: includes/class/class.LSldap.php:911 msgid "LSldap: Error during the LDAP server connection (%{msg})." msgstr "" -#: includes/class/class.LSldap.php:767 +#: includes/class/class.LSldap.php:914 msgid "LSldap: Error during the LDAP search (%{msg})." msgstr "" -#: includes/class/class.LSldap.php:770 +#: includes/class/class.LSldap.php:917 msgid "LSldap: Object type unknown." msgstr "" -#: includes/class/class.LSldap.php:773 +#: includes/class/class.LSldap.php:920 msgid "LSldap: Error while fetching the LDAP entry." msgstr "" -#: includes/class/class.LSldap.php:776 +#: includes/class/class.LSldap.php:923 msgid "LSldap: Error while changing the LDAP entry (DN : %{dn})." msgstr "" -#: includes/class/class.LSldap.php:779 +#: includes/class/class.LSldap.php:926 msgid "LSldap: Error while deleting empty attributes." msgstr "" -#: includes/class/class.LSldap.php:782 +#: includes/class/class.LSldap.php:929 msgid "LSldap: Error while changing the DN of the object." msgstr "" -#: includes/class/class.LSldap.php:785 +#: includes/class/class.LSldap.php:932 msgid "LSldap: LDAP server base DN not configured." msgstr "" -#: includes/class/class.LSldap.php:788 +#: includes/class/class.LSldap.php:935 msgid "LSldap: Fail to set authz proxy option on LDAP server connection." msgstr "" -#: includes/class/class.LSldap.php:791 +#: includes/class/class.LSldap.php:938 msgid "LSldap: Error while changing the user password: %{msg}." msgstr "" -#: includes/class/class.LSldap.php:794 +#: includes/class/class.LSldap.php:941 msgid "LSldap: Unknown LDAP error while updating user password" msgstr "" +#: includes/class/class.LSldap.php:944 +msgid "" +"LSldap: Fail to execute trigger %{callable} on event %{event} : is not " +"callable." +msgstr "" + +#: includes/class/class.LSldap.php:947 +msgid "" +"LSldap: Error during the execution of the trigger %{callable} on event " +"%{event}." +msgstr "" + #: includes/class/class.LSformRule_ldapSearchURI.php:59 msgid "Invalid LDAP server URI (%{uri})" msgstr ""