mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 23:50:03 -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> |
||
---|---|---|
.. | ||
build | ||
css | ||
doc | ||
images | ||
js | ||
less | ||
src | ||
test | ||
util | ||
favicon.ico | ||
Gruntfile.js | ||
ie.css | ||
index.html | ||
ipa.css | ||
jsl.conf | ||
Makefile.am | ||
package.json | ||
README-LICENSE.txt | ||
reset_password.html | ||
sync_otp.html |