diff options
author | Rob Crittenden <rcritten@redhat.com> | 2011-11-28 12:31:45 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-12-05 22:29:02 -0500 |
commit | 181e6da9d8d9ee601989f845356a3c5b31d2720b (patch) | |
tree | d87f42ed6c427da7eb00a93092cb8e35cc8f3429 /ipalib/plugins/user.py | |
parent | 59721431d29c5684924c1d76ffe1c59cd6149d97 (diff) | |
download | freeipa-181e6da9d8d9ee601989f845356a3c5b31d2720b.tar.gz freeipa-181e6da9d8d9ee601989f845356a3c5b31d2720b.tar.xz freeipa-181e6da9d8d9ee601989f845356a3c5b31d2720b.zip |
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
Diffstat (limited to 'ipalib/plugins/user.py')
-rw-r--r-- | ipalib/plugins/user.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py index d3e63ef9a..a3c17dc4c 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', |