diff options
author | Kevin McCarthy <kmccarth@redhat.com> | 2007-09-25 15:44:49 -0700 |
---|---|---|
committer | Kevin McCarthy <kmccarth@redhat.com> | 2007-09-25 15:44:49 -0700 |
commit | fa7759684f97f1faa174db234865cea6442ac6f8 (patch) | |
tree | 65363205d758c7d107c61fc53309f6feeb2fbd63 /ipa-python/ipaclient.py | |
parent | 765279d82b24da0aac1821fea0c4c02859ffe00c (diff) | |
download | freeipa-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/ipaclient.py')
-rw-r--r-- | ipa-python/ipaclient.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ipa-python/ipaclient.py b/ipa-python/ipaclient.py index 6fbd41d5..3093fa97 100644 --- a/ipa-python/ipaclient.py +++ b/ipa-python/ipaclient.py @@ -68,6 +68,15 @@ class IPAClient: result = self.transport.get_user_by_dn(dn,sattrs) return user.User(result) + def get_users_by_manager(self,manager_dn,sattrs=None): + """Gets the users the report to a particular 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 groups.""" + results = self.transport.get_users_by_manager(manager_dn, sattrs) + + return map(lambda result: user.User(result), results) + def add_user(self,user,user_container=None): """Add a user. user is a ipa.user.User object""" |