summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorJr Aquino <jr.aquino@citrix.com>2011-05-31 14:52:35 -0700
committerRob Crittenden <rcritten@redhat.com>2011-06-06 13:14:38 -0400
commitd7c60205a6232f52eec80126a649b1319ed77974 (patch)
tree866a291b60129b9f84df69daa894b72e529cdaba /ipalib
parent4080a03051b244c061fdc494dec67d3ee97f9a1a (diff)
downloadfreeipa-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')
-rw-r--r--ipalib/plugins/group.py5
-rw-r--r--ipalib/plugins/host.py5
-rw-r--r--ipalib/plugins/hostgroup.py4
-rw-r--r--ipalib/plugins/user.py4
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