On 06/03/2016 02:19 PM, Martin Basti wrote:


On 03.06.2016 14:13, Stanislav Laznicka wrote:
https://fedorahosted.org/freeipa/ticket/5892


NACK

please remove it from LDAPAddReverseMember too, it contains the same code

Martin^2

Please see the modified patch.

Standa

From 6bd0ea9cb7749cceba40e5df03aeca2e9ee3b70d Mon Sep 17 00:00:00 2001
From: Stanislav Laznicka <slazn...@redhat.com>
Date: Fri, 3 Jun 2016 14:08:59 +0200
Subject: [PATCH] Removed dead code from LDAP{Remove,Add}ReverseMember

https://fedorahosted.org/freeipa/ticket/5892
---
 ipaserver/plugins/baseldap.py | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/ipaserver/plugins/baseldap.py b/ipaserver/plugins/baseldap.py
index bbd8ba146ead81857bbc4c2aee550b855b846be5..3f0e68b143f2dcb50be6bc49a752b19da02a248d 100644
--- a/ipaserver/plugins/baseldap.py
+++ b/ipaserver/plugins/baseldap.py
@@ -2129,14 +2129,6 @@ class LDAPAddReverseMember(LDAPModReverseMember):
             dn = callback(self, ldap, dn, *keys, **options)
             assert isinstance(dn, DN)
 
-        if options.get('all', False):
-            attrs_list = ['*'] + self.obj.default_attributes
-        else:
-            attrs_list = set(self.obj.default_attributes)
-            if options.get('no_members', False):
-                attrs_list.difference_update(self.obj.attribute_members)
-            attrs_list = list(attrs_list)
-
         completed = 0
         failed = {'member': {self.reverse_attr: []}}
         for attr in options.get(self.reverse_attr) or []:
@@ -2228,14 +2220,6 @@ class LDAPRemoveReverseMember(LDAPModReverseMember):
             dn = callback(self, ldap, dn, *keys, **options)
             assert isinstance(dn, DN)
 
-        if options.get('all', False):
-            attrs_list = ['*'] + self.obj.default_attributes
-        else:
-            attrs_list = set(self.obj.default_attributes)
-            if options.get('no_members', False):
-                attrs_list.difference_update(self.obj.attribute_members)
-            attrs_list = list(attrs_list)
-
         completed = 0
         failed = {'member': {self.reverse_attr: []}}
         for attr in options.get(self.reverse_attr) or []:
-- 
2.5.5

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to