The LDAP*ReverseMember shouldn't imply --all is always specified

The LDAP*ReverseMember methods would always return the whole LDAP
object even though --all is not specified.
Also had to fix some tests as objectClass will not be returned by
default now.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Stanislav Laznicka 2016-06-07 13:51:46 +02:00 committed by Jan Cholasta
parent 30d054a573
commit 427bbf6c0d
3 changed files with 2 additions and 11 deletions

View File

@ -2159,7 +2159,7 @@ class LDAPAddReverseMember(LDAPModReverseMember):
failed['member'][self.reverse_attr].append((attr, unicode(e)))
# Update the member data.
entry_attrs = ldap.get_entry(dn, ['*'])
entry_attrs = ldap.get_entry(dn, attrs_list)
self.obj.convert_attribute_members(entry_attrs, *keys, **options)
for callback in self.get_callbacks('post'):
@ -2258,7 +2258,7 @@ class LDAPRemoveReverseMember(LDAPModReverseMember):
failed['member'][self.reverse_attr].append((attr, unicode(e)))
# Update the member data.
entry_attrs = ldap.get_entry(dn, ['*'])
entry_attrs = ldap.get_entry(dn, attrs_list)
self.obj.convert_attribute_members(entry_attrs, *keys, **options)
for callback in self.get_callbacks('post'):

View File

@ -484,7 +484,6 @@ class test_permission(Declarative):
'cn': [privilege1],
'description': [u'privilege desc. 1'],
'memberof_permission': [permission1],
'objectclass': objectclasses.privilege,
}
),
),
@ -3067,7 +3066,6 @@ def _make_permission_flag_tests(flags, expected_message):
'cn': [privilege1],
'description': [u'privilege desc. 1'],
'memberof_permission': [permission1],
'objectclass': objectclasses.privilege,
}
),
),
@ -3310,7 +3308,6 @@ class test_permission_bindtype(Declarative):
dn=privilege1_dn,
cn=[privilege1],
description=[u'privilege desc. 1'],
objectclass=objectclasses.privilege,
),
),
),
@ -3419,7 +3416,6 @@ class test_permission_bindtype(Declarative):
cn=[privilege1],
description=[u'privilege desc. 1'],
memberof_permission=[permission1],
objectclass=objectclasses.privilege,
)
),
),

View File

@ -199,7 +199,6 @@ class test_role(Declarative):
'cn': [role1],
'description': [u'role desc 1'],
'memberof_privilege': [privilege1],
'objectclass': objectclasses.role,
}
),
),
@ -221,7 +220,6 @@ class test_role(Declarative):
'cn': [role1],
'description': [u'role desc 1'],
'memberof_privilege': [privilege1],
'objectclass': objectclasses.role,
}
),
),
@ -243,7 +241,6 @@ class test_role(Declarative):
'cn': [role1],
'description': [u'role desc 1'],
'memberof_privilege': [privilege1],
'objectclass': objectclasses.role,
}
),
),
@ -603,7 +600,6 @@ class test_role(Declarative):
'dn': role1_dn,
'cn': [role1],
'description': [u'New desc 1'],
'objectclass': objectclasses.role,
}
),
),
@ -625,7 +621,6 @@ class test_role(Declarative):
'dn': role1_dn,
'cn': [role1],
'description': [u'New desc 1'],
'objectclass': objectclasses.role,
}
),
),