summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/user.py
diff options
context:
space:
mode:
authorOndrej Hamada <ohamada@redhat.com>2011-11-10 13:46:16 +0100
committerMartin Kosek <mkosek@redhat.com>2011-11-10 14:11:02 +0100
commit8089f2859c94223da3d33421c20e1d6ae21d9abf (patch)
tree36317d84c01291ec323e499fd65d59008d011ab7 /ipalib/plugins/user.py
parent843c0787b7e123801250b9a0fb5b974cd9fd7e7b (diff)
downloadfreeipa-8089f2859c94223da3d33421c20e1d6ae21d9abf.tar.gz
freeipa-8089f2859c94223da3d33421c20e1d6ae21d9abf.tar.xz
freeipa-8089f2859c94223da3d33421c20e1d6ae21d9abf.zip
Misleading Keytab field
The 'Keytab' field in output of all 'user-*' commands was changed to 'Kerberos keys available'. In order to do this change for 'user-*' commands only, the flag 'has_keytab' had to be removed from common output parametrs in ipalib/baseldap.py. This change also affected the host.py and service.py, where the 'has_keytab' flag was added to their local output params. Both host.py and service.py holds the old field caption - 'Keytab' - because of compatibility with older clients. https://fedorahosted.org/freeipa/ticket/1961
Diffstat (limited to 'ipalib/plugins/user.py')
-rw-r--r--ipalib/plugins/user.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py
index 273c68fb2..d3e63ef9a 100644
--- a/ipalib/plugins/user.py
+++ b/ipalib/plugins/user.py
@@ -68,6 +68,12 @@ EXAMPLES:
NO_UPG_MAGIC = '__no_upg__'
+user_output_params = (
+ Flag('has_keytab',
+ label=_('Kerberos keys available'),
+ ),
+ )
+
def validate_nsaccountlock(entry_attrs):
if 'nsaccountlock' in entry_attrs:
nsaccountlock = entry_attrs['nsaccountlock']
@@ -352,6 +358,8 @@ class user_add(LDAPCreate):
msg_summary = _('Added user "%(value)s"')
+ has_output_params = LDAPCreate.has_output_params + user_output_params
+
takes_options = LDAPCreate.takes_options + (
Flag('noprivate',
cli_name='noprivate',
@@ -477,6 +485,8 @@ class user_mod(LDAPUpdate):
msg_summary = _('Modified user "%(value)s"')
+ has_output_params = LDAPUpdate.has_output_params + user_output_params
+
def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options):
if 'mail' in entry_attrs:
entry_attrs['mail'] = self.obj._normalize_email(entry_attrs['mail'])
@@ -498,6 +508,7 @@ class user_find(LDAPSearch):
__doc__ = _('Search for users.')
member_attributes = ['memberof']
+ has_output_params = LDAPSearch.has_output_params + user_output_params
takes_options = LDAPSearch.takes_options + (
Flag('whoami',
@@ -532,6 +543,8 @@ api.register(user_find)
class user_show(LDAPRetrieve):
__doc__ = _('Display information about a user.')
+ has_output_params = LDAPRetrieve.has_output_params + user_output_params
+
def post_callback(self, ldap, dn, entry_attrs, *keys, **options):
convert_nsaccountlock(entry_attrs)
self.obj._convert_manager(entry_attrs, **options)
@@ -566,6 +579,7 @@ class user_enable(LDAPQuery):
__doc__ = _('Enable a user account.')
has_output = output.standard_value
+ has_output_params = LDAPQuery.has_output_params + user_output_params
msg_summary = _('Enabled user account "%(value)s"')
def execute(self, *keys, **options):