summaryrefslogtreecommitdiffstats
path: root/ipa-server/xmlrpc-server/funcs.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-server/xmlrpc-server/funcs.py')
-rw-r--r--ipa-server/xmlrpc-server/funcs.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/ipa-server/xmlrpc-server/funcs.py b/ipa-server/xmlrpc-server/funcs.py
index f62a6aba8..7ce83d576 100644
--- a/ipa-server/xmlrpc-server/funcs.py
+++ b/ipa-server/xmlrpc-server/funcs.py
@@ -28,6 +28,7 @@ import ipaserver.ipaldap
import ipa.ipautil
import xmlrpclib
import copy
+import attrs
from ipa import ipaerror
import string
@@ -1051,6 +1052,16 @@ class IPAServer:
raise
return ret
+ def attrs_to_labels(self, attr_list, opts=None):
+ """Take a list of LDAP attributes and convert them to more friendly
+ labels."""
+ label_list = {}
+
+ for a in attr_list:
+ label_list[a] = attrs.attr_label_list.get(a,a)
+
+ return label_list
+
def ldap_search_escape(match):
"""Escapes out nasty characters from the ldap search.
See RFC 2254."""