mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-26 00:41:25 -06:00
Ensure users exist when assigning tokens to them
https://fedorahosted.org/freeipa/ticket/4642 Reviewed-By: Petr Vobornik <pvoborni@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
parent
93ff9ec087
commit
c38e2d7394
@ -100,8 +100,11 @@ def _convert_owner(userobj, entry_attrs, options):
|
|||||||
|
|
||||||
def _normalize_owner(userobj, entry_attrs):
|
def _normalize_owner(userobj, entry_attrs):
|
||||||
owner = entry_attrs.get('ipatokenowner', None)
|
owner = entry_attrs.get('ipatokenowner', None)
|
||||||
if owner is not None:
|
if owner:
|
||||||
entry_attrs['ipatokenowner'] = userobj.get_dn(owner)
|
try:
|
||||||
|
entry_attrs['ipatokenowner'] = userobj._normalize_manager(owner)[0]
|
||||||
|
except NotFound:
|
||||||
|
userobj.handle_not_found(owner)
|
||||||
|
|
||||||
def _check_interval(not_before, not_after):
|
def _check_interval(not_before, not_after):
|
||||||
if not_before and not_after:
|
if not_before and not_after:
|
||||||
|
Loading…
Reference in New Issue
Block a user