diff options
author | Jr Aquino <jr.aquino@citrix.com> | 2011-05-31 14:52:35 -0700 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-06-06 13:14:38 -0400 |
commit | d7c60205a6232f52eec80126a649b1319ed77974 (patch) | |
tree | 866a291b60129b9f84df69daa894b72e529cdaba /ipalib/plugins | |
parent | 4080a03051b244c061fdc494dec67d3ee97f9a1a (diff) | |
download | freeipa-d7c60205a6232f52eec80126a649b1319ed77974.tar.gz freeipa-d7c60205a6232f52eec80126a649b1319ed77974.tar.xz freeipa-d7c60205a6232f52eec80126a649b1319ed77974.zip |
Add sudorule and hbacrule to memberof and indirectmemberof attributes
Add Add tests for users, groups, hosts and hostgroups to verify membership
Update API to version 2.3
https://fedorahosted.org/freeipa/ticket/1170
Diffstat (limited to 'ipalib/plugins')
-rw-r--r-- | ipalib/plugins/group.py | 5 | ||||
-rw-r--r-- | ipalib/plugins/host.py | 5 | ||||
-rw-r--r-- | ipalib/plugins/hostgroup.py | 4 | ||||
-rw-r--r-- | ipalib/plugins/user.py | 4 |
4 files changed, 10 insertions, 8 deletions
diff --git a/ipalib/plugins/group.py b/ipalib/plugins/group.py index d4d0715c5..163a6f5da 100644 --- a/ipalib/plugins/group.py +++ b/ipalib/plugins/group.py @@ -90,9 +90,10 @@ class group(LDAPObject): uuid_attribute = 'ipauniqueid' attribute_members = { 'member': ['user', 'group'], - 'memberof': ['group', 'netgroup', 'role',], + 'memberof': ['group', 'netgroup', 'role', 'hbacrule', 'sudorule'], 'memberindirect': ['user', 'group', 'netgroup', 'role'], - 'memberofindirect': ['group', 'netgroup', 'role'], + 'memberofindirect': ['group', 'netgroup', 'role', 'hbacrule', + 'sudorule'], } rdnattr = 'cn' diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py index 4947986f6..a602df4d1 100644 --- a/ipalib/plugins/host.py +++ b/ipalib/plugins/host.py @@ -214,9 +214,10 @@ class host(LDAPObject): uuid_attribute = 'ipauniqueid' attribute_members = { 'enrolledby': ['user'], - 'memberof': ['hostgroup', 'netgroup', 'role'], + 'memberof': ['hostgroup', 'netgroup', 'role', 'hbacrule', 'sudorule'], 'managedby': ['host'], - 'memberofindirect': ['hostgroup', 'netgroup', 'role'], + 'memberofindirect': ['hostgroup', 'netgroup', 'role', 'hbacrule', + 'sudorule'], } bindable = True relationships = { diff --git a/ipalib/plugins/hostgroup.py b/ipalib/plugins/hostgroup.py index 715523440..4ffc2217e 100644 --- a/ipalib/plugins/hostgroup.py +++ b/ipalib/plugins/hostgroup.py @@ -65,9 +65,9 @@ class hostgroup(LDAPObject): uuid_attribute = 'ipauniqueid' attribute_members = { 'member': ['host', 'hostgroup'], - 'memberof': ['hostgroup'], + 'memberof': ['hostgroup', 'hbacrule', 'sudorule'], 'memberindirect': ['host', 'hostgroup'], - 'memberofindirect': ['host', 'hostgroup'], + 'memberofindirect': ['host', 'hostgroup', 'hbacrule', 'sudorule'], } label = _('Host Groups') diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py index c4d875a2d..6111d1632 100644 --- a/ipalib/plugins/user.py +++ b/ipalib/plugins/user.py @@ -99,8 +99,8 @@ class user(LDAPObject): ] uuid_attribute = 'ipauniqueid' attribute_members = { - 'memberof': ['group', 'netgroup', 'role'], - 'memberofindirect': ['group', 'netgroup', 'role'], + 'memberof': ['group', 'netgroup', 'role', 'hbacrule', 'sudorule'], + 'memberofindirect': ['group', 'netgroup', 'role', 'hbacrule', 'sudorule'], } rdnattr = 'uid' bindable = True |