resetdb: supprime la regexp de validation sur pslBadgeCSN (#33401)
This commit is contained in:
parent
af2c7c7e96
commit
842a431cd1
|
@ -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
|
||||
|
|
|
@ -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 <<EOF >$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é"
|
||||
|
|
Reference in New Issue