Error when renaming a object with single-value main attribute
Error when renaming a object with single-value main attribute
Description
We get an error when trying to rename a supann entity (change its code), or any object that uses in its DN an attribute which is single-valued in the schema, we get a constraint violation.
Distribution Name and Version
Debian Stretch
FusionDirectory Version
1.2
PHP version used
7.0
Origin of php packages
Debian stretch
Steps to Reproduce
- create a supann entity
- save it
- change the supann code entity
supannCodeEntite=10-agent-comptable --> supannCodeEntite=cc-agent-comptable
Le déplacement de «supannCodeEntite=10-agent-comptable,ou=structures,dc=campus-condorcet,dc=fr» à «supannCodeEntite=cc-agent-comptable,ou=structures,dc=campus-condorcet,dc=fr» a échoué
Idem pour c-epcc --> cc-epcc
La requête LDAP a échoué !
Objet: supannCodeEntite=c-epcc,ou=structures,dc=campus-condorcet,dc=fr
Erreur: Naming violation (value of naming attribute 'supannCodeEntite' is not present in entry, lors de l'opération sur 'supannCodeEntite=c-epcc,ou=structures,dc=campus-condorcet,dc=fr' en utilisant le serveur LDAP 'ldaps://ldap1-test.campus-condorcet.fr')
Expected behavior:
Be able to rename supann entity and etablishment
Actual behavior:
Impossible to do it
Reproduces how often:
100%
Additional Information
This is caused by the call to ldap_rename setting $deleteoldrdn to FALSE instead of TRUE.