diff options
author | Rob Crittenden <rcritten@redhat.com> | 2011-06-24 14:32:57 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-07-11 18:43:32 -0400 |
commit | 3a5e26a01c9cbb7b0a1c38d1b0467b780c3df124 (patch) | |
tree | eeb797ba3cb6167a8d4c677d339e7a348f1bee59 /ipalib/plugins | |
parent | 3229eee074e6b419f64faa9bb701a60fe96da3a6 (diff) | |
download | freeipa-3a5e26a01c9cbb7b0a1c38d1b0467b780c3df124.tar.gz freeipa-3a5e26a01c9cbb7b0a1c38d1b0467b780c3df124.tar.xz freeipa-3a5e26a01c9cbb7b0a1c38d1b0467b780c3df124.zip |
Enforce class rules when query=True, continue to not run validators.
This started as a problem in allowing leading/trailing whitespaces
on primary keys. In nearly every command other than add query is True
so all rules were ignored on the primary key. This meant that to
enforce whitespace we would need to define a validator for each one.
I decided instead to set self.all_rules to just the class rules if
query == True. So the minimum set of validators will be executed
against each type but param-specific validators will only run on add.
https://fedorahosted.org/freeipa/ticket/1285
https://fedorahosted.org/freeipa/ticket/1286
https://fedorahosted.org/freeipa/ticket/1287
Diffstat (limited to 'ipalib/plugins')
-rw-r--r-- | ipalib/plugins/baseldap.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py index 3465c3746..5912b8dcf 100644 --- a/ipalib/plugins/baseldap.py +++ b/ipalib/plugins/baseldap.py @@ -1365,7 +1365,7 @@ class LDAPSearch(CallbackInterface, crud.Search): #pylint: disable=E1003 for key in self.obj.get_ancestor_primary_keys(): yield key - yield Str('criteria?') + yield Str('criteria?', noextrawhitespace=False) for arg in super(crud.Search, self).get_args(): yield arg |