mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix --{user,group}-ignore-attribute in migration plugin.
Ignore case in attribute names. https://fedorahosted.org/freeipa/ticket/4620 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
committed by
Petr Viktorin
parent
58737c7791
commit
35dad9684b
@@ -196,9 +196,8 @@ def _pre_migrate_user(ldap, pkey, dn, entry_attrs, failed, config, ctx, **kwargs
|
|||||||
entry_attrs.setdefault('loginshell', default_shell)
|
entry_attrs.setdefault('loginshell', default_shell)
|
||||||
|
|
||||||
# do not migrate all attributes
|
# do not migrate all attributes
|
||||||
for attr in entry_attrs.keys():
|
for attr in attr_blacklist:
|
||||||
if attr in attr_blacklist:
|
entry_attrs.pop(attr, None)
|
||||||
del entry_attrs[attr]
|
|
||||||
|
|
||||||
# do not migrate all object classes
|
# do not migrate all object classes
|
||||||
if 'objectclass' in entry_attrs:
|
if 'objectclass' in entry_attrs:
|
||||||
@@ -393,9 +392,8 @@ def _pre_migrate_group(ldap, pkey, dn, entry_attrs, failed, config, ctx, **kwarg
|
|||||||
raise ValueError('Schema %s not supported' % schema)
|
raise ValueError('Schema %s not supported' % schema)
|
||||||
|
|
||||||
# do not migrate all attributes
|
# do not migrate all attributes
|
||||||
for attr in entry_attrs.keys():
|
for attr in attr_blacklist:
|
||||||
if attr in attr_blacklist:
|
entry_attrs.pop(attr, None)
|
||||||
del entry_attrs[attr]
|
|
||||||
|
|
||||||
# do not migrate all object classes
|
# do not migrate all object classes
|
||||||
if 'objectclass' in entry_attrs:
|
if 'objectclass' in entry_attrs:
|
||||||
|
|||||||
Reference in New Issue
Block a user