otptoken, permission: Convert custom type parameters on server

Force client to send the value of ipatokenotpkey and ipapermlocation as
entered by user.

https://fedorahosted.org/freeipa/ticket/6247

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
David Kupka
2016-08-25 11:53:39 +02:00
committed by Jan Cholasta
parent 6581389ac3
commit 386fdc1d77
2 changed files with 4 additions and 0 deletions

View File

@@ -214,6 +214,8 @@ class otptoken(LDAPObject):
doc=_('Token secret (Base32; default: random)'),
default_from=lambda: os.urandom(KEY_LENGTH),
autofill=True,
# force server-side conversion
normalizer=lambda x: x,
flags=('no_display', 'no_update', 'no_search'),
),
StrEnum('ipatokenotpalgorithm?',

View File

@@ -283,6 +283,8 @@ class permission(baseldap.LDAPObject):
cli_name='subtree',
label=_('Subtree'),
doc=_('Subtree to apply permissions to'),
# force server-side conversion
normalizer=lambda x: x,
flags={'ask_create'},
),
Str(