mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 07:33:27 -06:00
6c5f2bcb30
In IPA framework we don't properly convert to Python bool type and just return a string (TRUE or FALSE). This can be seen with many boolean attributes, like Bool('idnsallowdynupdate?', cli_name='dynamic_update', label=_('Dynamic update'), doc=_('Allow dynamic updates.'), attribute=True, default=False, autofill=True ), in 'ipa dnszone-show': > > > api.Command.dnszone_show('ipa.test')['result']['idnsallowdynupdate'] ['TRUE'] This is because we don't have the reverse (from LDAP to Python) mapping for the LDAP boolean OID 1.3.6.1.4.1.1466.115.121.1.7. When Web UI asks for the entry, it gets back JSON output that contains this 'TRUE' value: "idnsallowdynupdate": [ "TRUE" ], Add proper mapping from LDAP to Python bool type. With this, a simple 'checkbox' type can be used in Web UI instead of a complex radio-box setup. Note that when IPA API is asked to return raw values, 'TRUE' and 'FALSE' still returned. These are the actual LDAP boolean attribute values. Care needs to be done in tests: - if output is from a command with --raw option, 'TRUE' or 'FALSE' should be expected - if output if from a normal (non-raw) command, True or False would be returned Fixes: https://pagure.io/freeipa/issue/9171 Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com> |
||
---|---|---|
.. | ||
azure | ||
man | ||
prci_definitions | ||
pytest_ipa | ||
test_cmdline | ||
test_custodia | ||
test_install | ||
test_integration | ||
test_ipaclient | ||
test_ipalib | ||
test_ipaplatform | ||
test_ipapython | ||
test_ipaserver | ||
test_ipatests_plugins | ||
test_webui | ||
test_xmlrpc | ||
__init__.py | ||
conftest.py | ||
create_external_ca.py | ||
data.py | ||
i18n.py | ||
ipa-run-tests | ||
ipa-test-config | ||
ipa-test-task | ||
Makefile.am | ||
setup.cfg | ||
setup.py | ||
test_util.py | ||
util.py |