From c25d62965af9dffc655d659dfcd1f39e8d08e66c Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 4 Oct 2010 17:45:40 -0400 Subject: Populate indirect members when showing a group object. This is done by creating a new attribute, memberindirect, to hold this indirect membership. The new function get_members() can return all members or just indirect or direct. We are only using it to retrieve indirect members currently. This also: * Moves all member display attributes into baseldap.py to reduce duplication * Adds netgroup nesting * Use a unique object name in hbacsvc and hbacsvcgroup ticket 296 --- ipalib/plugins/rolegroup.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'ipalib/plugins/rolegroup.py') diff --git a/ipalib/plugins/rolegroup.py b/ipalib/plugins/rolegroup.py index feffa0d4..e0b6fbc4 100644 --- a/ipalib/plugins/rolegroup.py +++ b/ipalib/plugins/rolegroup.py @@ -70,10 +70,13 @@ class rolegroup(LDAPObject): object_name = 'rolegroup' object_name_plural = 'rolegroups' object_class = ['groupofnames', 'nestedgroup'] - default_attributes = ['cn', 'description', 'member', 'memberof'] + default_attributes = ['cn', 'description', 'member', 'memberof', + 'memberindirect' + ] attribute_members = { 'member': ['user', 'group', 'host', 'hostgroup'], 'memberof': ['taskgroup'], + 'memberindirect': ['user', 'group', 'host', 'hostgroup'], } rdnattr='cn' @@ -91,18 +94,6 @@ class rolegroup(LDAPObject): label=_('Description'), doc=_('A description of this role-group'), ), - Str('member_group?', - label=_('Member groups'), - flags=['no_create', 'no_update', 'no_search'], - ), - Str('member_user?', - label=_('Member users'), - flags=['no_create', 'no_update', 'no_search'], - ), - Str('memberof_taskgroup?', - label=_('Member of task-groups'), - flags=['no_create', 'no_update', 'no_search'], - ), ) api.register(rolegroup) -- cgit