summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Hamada <ohamada@redhat.com>2012-04-05 17:42:41 +0200
committerRob Crittenden <rcritten@redhat.com>2012-04-08 16:48:54 -0400
commitd75bffccd6f409ef3f6a65f47a6f256b7ac7f2d7 (patch)
treefcb78e1532f2da87c367b7aca95c3cbd96645ca3
parent7e26517840847b344a607d017dcf94d7905c41b4 (diff)
downloadfreeipa-d75bffccd6f409ef3f6a65f47a6f256b7ac7f2d7.tar.gz
freeipa-d75bffccd6f409ef3f6a65f47a6f256b7ac7f2d7.tar.xz
freeipa-d75bffccd6f409ef3f6a65f47a6f256b7ac7f2d7.zip
Confusing default user groups
Added 'fallback' into the labels for default automember group and hostgroup. https://fedorahosted.org/freeipa/ticket/2354
-rw-r--r--ipalib/plugins/automember.py35
-rw-r--r--tests/test_xmlrpc/test_automember_plugin.py6
2 files changed, 23 insertions, 18 deletions
diff --git a/ipalib/plugins/automember.py b/ipalib/plugins/automember.py
index fabc9bb35..bf4cb355c 100644
--- a/ipalib/plugins/automember.py
+++ b/ipalib/plugins/automember.py
@@ -33,12 +33,17 @@ or exclusive regex paterns, you can automatically assign a new entries into
a group or hostgroup based upon attribute information.
A rule is directly associated with a group by name, so you cannot create
-a rule without an accompanying group or hostgroup
+a rule without an accompanying group or hostgroup.
A condition is a regular expression used by 389-ds to match a new incoming
entry with an automember rule. If it matches an inclusive rule then the
entry is added to the appropriate group or hostgroup.
+A default group or hostgroup could be specified for entries that do not
+match any rule. In case of user entries this group will be a fallback group
+because all users are by default members of group specified in IPA config.
+
+
EXAMPLES:
Add the initial group or hostgroup:
@@ -80,15 +85,15 @@ EXAMPLES:
Modify the automember rule:
ipa automember-mod
- Set the default target group:
+ Set the default (fallback) target group:
ipa automember-default-group-set --default-group=webservers --type=hostgroup
ipa automember-default-group-set --default-group=ipausers --type=group
- Remove the default target group:
+ Remove the default (fallback) target group:
ipa automember-default-group-remove --type=hostgroup
ipa automember-default-group-remove --type=group
- Show the default target group:
+ Show the default (fallback) target group:
ipa automember-default-group-show --type=hostgroup
ipa automember-default-group-show --type=group
@@ -173,7 +178,7 @@ class automember(LDAPObject):
),
Str('automemberdefaultgroup?',
cli_name='default_group',
- label=_('Default Group'),
+ label=_('Default (fallback) Group'),
doc=_('Default group for entries to land'),
flags=['no_create', 'no_update', 'no_search']
),
@@ -500,18 +505,18 @@ api.register(automember_show)
class automember_default_group_set(LDAPUpdate):
__doc__ = _("""
- Set default group for all unmatched entries.
+ Set default (fallback) group for all unmatched entries.
""")
takes_options = (
Str('automemberdefaultgroup',
cli_name='default_group',
- label=_('Default Group'),
- doc=_('Default group for entires to land'),
+ label=_('Default (fallback) Group'),
+ doc=_('Default (fallback) group for entries to land'),
flags=['no_create', 'no_update']
),
) + group_type
- msg_summary = _('Set default group for automember "%(value)s"')
+ msg_summary = _('Set default (fallback) group for automember "%(value)s"')
def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options):
dn = DN(('cn', options['type']), api.env.container_automember)
@@ -529,11 +534,11 @@ api.register(automember_default_group_set)
class automember_default_group_remove(LDAPUpdate):
__doc__ = _("""
- Remove default group for all unmatched entries.
+ Remove default (fallback) group for all unmatched entries.
""")
takes_options = group_type
- msg_summary = _('Removed default group for automember "%(value)s"')
+ msg_summary = _('Removed default (fallback) group for automember "%(value)s"')
def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options):
dn = DN(('cn', options['type']), api.env.container_automember)
@@ -545,14 +550,14 @@ class automember_default_group_remove(LDAPUpdate):
)
if attr not in entry_attrs_:
- raise errors.NotFound(reason=_(u'No default group set'))
+ raise errors.NotFound(reason=_(u'No default (fallback) group set'))
else:
entry_attrs[attr] = []
return dn
def post_callback(self, ldap, dn, entry_attrs, *keys, **options):
if 'automemberdefaultgroup' not in entry_attrs:
- entry_attrs['automemberdefaultgroup'] = u'No default group set'
+ entry_attrs['automemberdefaultgroup'] = unicode(_('No default (fallback) group set'))
return dn
def execute(self, *keys, **options):
@@ -565,7 +570,7 @@ api.register(automember_default_group_remove)
class automember_default_group_show(LDAPRetrieve):
__doc__ = _("""
- Display information about the default automember groups.
+ Display information about the default (fallback) automember groups.
""")
takes_options = group_type
@@ -576,7 +581,7 @@ class automember_default_group_show(LDAPRetrieve):
def post_callback(self, ldap, dn, entry_attrs, *keys, **options):
if 'automemberdefaultgroup' not in entry_attrs:
- entry_attrs['automemberdefaultgroup'] = u'No default group set'
+ entry_attrs['automemberdefaultgroup'] = unicode(_('No default (fallback) group set'))
return dn
def execute(self, *keys, **options):
diff --git a/tests/test_xmlrpc/test_automember_plugin.py b/tests/test_xmlrpc/test_automember_plugin.py
index 265c3af86..b59899b45 100644
--- a/tests/test_xmlrpc/test_automember_plugin.py
+++ b/tests/test_xmlrpc/test_automember_plugin.py
@@ -710,7 +710,7 @@ class test_automember(Declarative):
automemberdefaultgroup=[u'cn=%s,cn=groups,cn=accounts,%s' % (defaultgroup1, api.env.basedn)],
),
value=u'group',
- summary=u'Set default group for automember "group"',
+ summary=u'Set default (fallback) group for automember "group"',
),
),
@@ -733,7 +733,7 @@ class test_automember(Declarative):
dict(
- desc='Set default automember group for hostgroups',
+ desc='Set default (fallback) automember group for hostgroups',
command=(
'automember_default_group_set', [], dict(
type=u'hostgroup',
@@ -746,7 +746,7 @@ class test_automember(Declarative):
automemberdefaultgroup=[u'cn=%s,cn=hostgroups,cn=accounts,%s' % (defaulthostgroup1, api.env.basedn)],
),
value=u'hostgroup',
- summary=u'Set default group for automember "hostgroup"',
+ summary=u'Set default (fallback) group for automember "hostgroup"',
),
),