mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Don't fail when adding default objectclasses using config-mod
The config plugin was adding together a list and a tuple, then converting to a set. Replace the operation with a set union. Regression test included. https://fedorahosted.org/freeipa/ticket/2706
This commit is contained in:
committed by
Martin Kosek
parent
d9d1967989
commit
c02fcf5d34
@@ -229,8 +229,8 @@ class config_mod(LDAPUpdate):
|
||||
if not entry_attrs[attr]:
|
||||
raise errors.ValidationError(name=attr,
|
||||
error=_('May not be empty'))
|
||||
objectclasses = list(set(entry_attrs[attr] \
|
||||
+ self.api.Object[obj].possible_objectclasses))
|
||||
objectclasses = list(set(entry_attrs[attr]).union(
|
||||
self.api.Object[obj].possible_objectclasses))
|
||||
new_allowed_attrs = ldap.get_allowed_attributes(objectclasses,
|
||||
raise_on_unknown=True)
|
||||
checked_attrs = self.api.Object[obj].default_attributes
|
||||
|
||||
Reference in New Issue
Block a user