mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 07:33:27 -06:00
172e4b9770
baseldap.py:add_external_pre_callback() allows to redefine validators used to validate member names. Originally this was done to allow hostname validation and reused default validators associated with other parameter types. Provide extension of the validator callbacks to allow fine grained validation strategy. This is helpful in case we want to apply an alternative validation strategy in case default validator fails. New validators can be added to 'member_validator' registry in a similar way to how API objects are registered: from .baseldap import member_validator @member_validator(membertype='foo') def my_new_validator(ldap, dn, keys, options, value): <validate value here> Arguments passed to the validator are arguments passed to the add_external_pre_callback() augmented with the value to validate. Fixes: https://pagure.io/freeipa/issue/3226 Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com> Signed-off-by: Peter Keresztes Schmidt <carbenium@outlook.com> Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com> |
||
---|---|---|
.. | ||
advise | ||
dnssec | ||
install | ||
plugins | ||
secrets | ||
__init__.py | ||
dcerpc_common.py | ||
dcerpc.py | ||
dns_data_management.py | ||
Makefile.am | ||
masters.py | ||
p11helper.py | ||
rpcserver.py | ||
servroles.py | ||
setup.cfg | ||
setup.py | ||
topology.py |