mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
graceperiod: ignore case when checking for missing objectclass
Don't assume that all objectclasses are lower-case. Some are camel-cased. Fixes: https://pagure.io/freeipa/issue/1539 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
@@ -587,7 +587,9 @@ class pwpolicy_mod(LDAPUpdate):
|
||||
def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options):
|
||||
assert isinstance(dn, DN)
|
||||
old_entry_attrs = ldap.get_entry(dn, ['objectclass'])
|
||||
if 'ipapwdpolicy' not in old_entry_attrs['objectclass']:
|
||||
if not self.obj.has_objectclass(
|
||||
old_entry_attrs['objectclass'], 'ipapwdpolicy'
|
||||
):
|
||||
old_entry_attrs['objectclass'].append('ipapwdpolicy')
|
||||
entry_attrs['objectclass'] = old_entry_attrs['objectclass']
|
||||
self.obj.convert_time_on_input(entry_attrs)
|
||||
|
||||
Reference in New Issue
Block a user