summaryrefslogtreecommitdiffstats
path: root/ipa_server/ipaldap.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2008-10-07 04:31:22 -0400
committerRob Crittenden <rcritten@redhat.com>2008-10-07 04:31:22 -0400
commite012e860b472bcb5a00a089e73113fb6989fde20 (patch)
tree4714d0954367b5dff94597307c582b71ce90ce89 /ipa_server/ipaldap.py
parent69bc5ad77adecaf7d8fde4a6578c3d2f3ef355df (diff)
downloadfreeipa-e012e860b472bcb5a00a089e73113fb6989fde20.tar.gz
freeipa-e012e860b472bcb5a00a089e73113fb6989fde20.tar.xz
freeipa-e012e860b472bcb5a00a089e73113fb6989fde20.zip
Implement user-mod
Diffstat (limited to 'ipa_server/ipaldap.py')
-rw-r--r--ipa_server/ipaldap.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/ipa_server/ipaldap.py b/ipa_server/ipaldap.py
index 07b207dc5..4ab0d759c 100644
--- a/ipa_server/ipaldap.py
+++ b/ipa_server/ipaldap.py
@@ -115,6 +115,15 @@ class Entry:
r.append((i[0], n))
return r
+ def toDict(self):
+ """Convert the attrs and values to a dict. The dict is keyed on the
+ attribute name. The value is either single value or a list of values."""
+ result = ipautil.CIDict(self.data)
+ for i in result.keys():
+ result[i] = ipautil.utf8_encode_values(result[i])
+ result['dn'] = self.dn
+ return result
+
def __str__(self):
"""Convert the Entry to its LDIF representation"""
return self.__repr__()