From 181e6da9d8d9ee601989f845356a3c5b31d2720b Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 28 Nov 2011 12:31:45 -0500 Subject: Mark some attributes required to match the schema. This makes no changes to the functionality in the command-line or GUI because these all have defaults anyway. This is mostly to show them properly in the UI and prevent someone from trying to erase the value (and getting a nasty schema error in response). https://fedorahosted.org/freeipa/ticket/2015 --- ipalib/plugins/user.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'ipalib/plugins/user.py') diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py index d3e63ef9..a3c17dc4 100644 --- a/ipalib/plugins/user.py +++ b/ipalib/plugins/user.py @@ -187,7 +187,7 @@ class user(LDAPObject): cli_name='last', label=_('Last name'), ), - Str('cn?', + Str('cn', label=_('Full name'), default_from=lambda givenname, sn: '%s %s' % (givenname, sn), autofill=True, @@ -202,10 +202,11 @@ class user(LDAPObject): default_from=lambda givenname, sn: '%c%c' % (givenname[0], sn[0]), autofill=True, ), - Str('homedirectory?', + Str('homedirectory', cli_name='homedir', label=_('Home directory'), default_from=lambda uid: '/home/%s' % uid, + autofill=True, ), Str('gecos?', label=_('GECOS field'), @@ -237,7 +238,7 @@ class user(LDAPObject): # bomb out via the webUI. exclude='webui', ), - Int('uidnumber?', + Int('uidnumber', cli_name='uid', label=_('UID'), doc=_('User ID Number (system will assign one if not provided)'), @@ -245,10 +246,11 @@ class user(LDAPObject): default=999, minvalue=1, ), - Int('gidnumber?', + Int('gidnumber', label=_('GID'), doc=_('Group ID Number'), - default_from=lambda uid: uid, + default_from=lambda uidnumber: uidnumber, + autofill=True, ), Str('street?', cli_name='street', -- cgit