From 842a431cd1518bff60793e6cb2b4c2fa90837293 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 24 May 2019 13:31:11 +0200 Subject: [PATCH] resetdb: supprime la regexp de validation sur pslBadgeCSN (#33401) --- lib/newdb | 1 - lib/resetdb | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/newdb b/lib/newdb index d580694..52c710b 100755 --- a/lib/newdb +++ b/lib/newdb @@ -227,7 +227,6 @@ olcConstraintAttribute: supannEtablissement, supannEtuTypeDiplome, regex "^\{[^}]+\}.*$" olcConstraintAttribute: supannEtuAnneeInscription regex "^[0-9][0-9][0-9][0-9]$" -olcConstraintAttribute: pslBadgeCSN regex "^[0-9A-F]{8,14}$" add olcOverlay={4}unique,olcDatabase={2}mdb,cn=config objectClass: olcOverlayConfig diff --git a/lib/resetdb b/lib/resetdb index 22e6cd9..ca878c3 100755 --- a/lib/resetdb +++ b/lib/resetdb @@ -135,12 +135,12 @@ olcConstraintAttribute: supannAliasLogin regex "^[[:alnum:]]+$" EOF echoonerror ldapmodify -H ldapi:// -Y EXTERNAL -f $LDIF && echo "- contrainte supannAliasLogin retiré" fi - # add the pslBadgeCSN constraint - if ! (ldapsearch -H ldapi:// -Y EXTERNAL -b "$DN2" 'olcConstraintAttribute=pslBadgeCSN regex "^[0-9A-F]{8,14}$"' 2>/dev/null | grep -q ^olc); then + # remove the pslBadgeCSN constraint + if (ldapsearch -H ldapi:// -Y EXTERNAL -b "$DN2" 'olcConstraintAttribute=pslBadgeCSN regex "^[0-9A-F]{8,14}$"' 2>/dev/null | grep -q ^olc); then cat <$LDIF dn: $DN2 changetype: modify -add: olcConstraintAttribute +delete: olcConstraintAttribute olcConstraintAttribute: pslBadgeCSN regex "^[0-9A-F]{8,14}$" EOF echoonerror ldapmodify -H ldapi:// -Y EXTERNAL -f $LDIF && echo "- contrainte pslBadgeCSN ajouté"