summaryrefslogtreecommitdiffstats
path: root/ipa-python/rpcclient.py
diff options
context:
space:
mode:
authorKevin McCarthy <kmccarth@redhat.com>2007-09-25 15:44:49 -0700
committerKevin McCarthy <kmccarth@redhat.com>2007-09-25 15:44:49 -0700
commitfa7759684f97f1faa174db234865cea6442ac6f8 (patch)
tree65363205d758c7d107c61fc53309f6feeb2fbd63 /ipa-python/rpcclient.py
parent765279d82b24da0aac1821fea0c4c02859ffe00c (diff)
downloadfreeipa-fa7759684f97f1faa174db234865cea6442ac6f8.tar.gz
freeipa-fa7759684f97f1faa174db234865cea6442ac6f8.tar.xz
freeipa-fa7759684f97f1faa174db234865cea6442ac6f8.zip
Adds manager and direct reports to usershow page.
Fixes a bug with the group by member where is wasn't trapping not found errors.
Diffstat (limited to 'ipa-python/rpcclient.py')
-rw-r--r--ipa-python/rpcclient.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/ipa-python/rpcclient.py b/ipa-python/rpcclient.py
index c662761cf..9d9990448 100644
--- a/ipa-python/rpcclient.py
+++ b/ipa-python/rpcclient.py
@@ -101,6 +101,23 @@ class RPCClient:
return ipautil.unwrap_binary_data(result)
+ def get_users_by_manager(self,manager_dn,sattrs=None):
+ """Gets the users that report to a manager.
+ If sattrs is not None then only those
+ attributes will be returned, otherwise all available
+ attributes are returned. The result is a list of dicts."""
+ server = self.setup_server()
+ if sattrs is None:
+ sattrs = "__NONE__"
+ try:
+ result = server.get_users_by_manager(manager_dn, sattrs)
+ except xmlrpclib.Fault, fault:
+ raise ipaerror.gen_exception(fault.faultCode, fault.faultString)
+ except socket.error, (value, msg):
+ raise xmlrpclib.Fault(value, msg)
+
+ return ipautil.unwrap_binary_data(result)
+
def add_user(self,user,user_container=None):
"""Add a new user. Takes as input a dict where the key is the
attribute name and the value is either a string or in the case