summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2014-07-24 17:17:48 +0200
committerPetr Viktorin <pviktori@redhat.com>2014-07-29 12:00:13 +0200
commit785e13dd1e16ad03d4ef03edcb672d6f9d8b457b (patch)
tree238898276253d857099e41d9496346e85185109a /ipalib
parent131353773643c5a7e0b155486759e6f6103cbee4 (diff)
downloadfreeipa-785e13dd1e16ad03d4ef03edcb672d6f9d8b457b.tar.gz
freeipa-785e13dd1e16ad03d4ef03edcb672d6f9d8b457b.tar.xz
freeipa-785e13dd1e16ad03d4ef03edcb672d6f9d8b457b.zip
Exclude attributelevelrights from --raw result processing in baseldap.
https://fedorahosted.org/freeipa/ticket/4371 Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/plugins/baseldap.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index 865a357bb..26b43b90d 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -240,9 +240,13 @@ def entry_from_entry(entry, newentry):
def entry_to_dict(entry, **options):
if options.get('raw', False):
result = {}
- for attr, value in entry.raw.iteritems():
- if entry.conn.get_type(attr) is not str:
- value = list(value)
+ for attr in entry.iterkeys():
+ if attr.lower() == 'attributelevelrights':
+ value = entry[attr]
+ elif entry.conn.get_type(attr) is str:
+ value = entry.raw[attr]
+ else:
+ value = list(entry.raw[attr])
for (i, v) in enumerate(value):
try:
value[i] = v.decode('utf-8')