diff options
author | Alexander Bokovoy <abokovoy@redhat.com> | 2011-06-27 15:08:13 +0300 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-06-27 23:03:23 -0400 |
commit | 716a25a784b4257ef4928afc18b6cebdb7d15e54 (patch) | |
tree | 5ab2602982249aedb8743c9d16727b6c3d42281f /ipalib | |
parent | f1e1223bd9c358367baac96ac7d6843edb56c5f6 (diff) | |
download | freeipa-716a25a784b4257ef4928afc18b6cebdb7d15e54.tar.gz freeipa-716a25a784b4257ef4928afc18b6cebdb7d15e54.tar.xz freeipa-716a25a784b4257ef4928afc18b6cebdb7d15e54.zip |
Convert Bool to TRUE/FALSE when working with LDAP backend https://fedorahosted.org/freeipa/ticket/1259
According to RFC4517 the only valid values for a boolean in LDAP are TRUE or FALSE.
This commit adds support to recognize TRUE and FALSE as valid Bool constants when converting from LDAP attribute values
and enforces TRUE or FALSE string for account locking.
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/parameters.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/parameters.py b/ipalib/parameters.py index ee660848b..3d9f208d2 100644 --- a/ipalib/parameters.py +++ b/ipalib/parameters.py @@ -903,8 +903,8 @@ class Bool(Param): # FIXME: This my quick hack to get some UI stuff working, change these defaults # --jderose 2009-08-28 kwargs = Param.kwargs + ( - ('truths', frozenset, frozenset([1, u'1', u'true'])), - ('falsehoods', frozenset, frozenset([0, u'0', u'false'])), + ('truths', frozenset, frozenset([1, u'1', u'true', u'TRUE'])), + ('falsehoods', frozenset, frozenset([0, u'0', u'false', u'FALSE'])), ) def _convert_scalar(self, value, index=None): |