mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-26 00:41:25 -06:00
Confusing default user groups
Added 'fallback' into the labels for default automember group and hostgroup. https://fedorahosted.org/freeipa/ticket/2354
This commit is contained in:
parent
7e26517840
commit
d75bffccd6
@ -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):
|
||||
|
@ -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"',
|
||||
),
|
||||
),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user