On 02/06/2014 05:59 AM, Petr Viktorin wrote:
> On 02/06/2014 09:31 AM, [email protected] wrote:
>> Hi:
>>
>> I can make it show on ldap browser or the ui but finding where to add it
>> in command base.
>>
>> ipa user-mod ---employeenumber no such parameter.
>
> You can use setattr where we don't provide specialized CLI arguments.
> Also note that employeenumber won't show in the default output; you'll
> want to use --all to retrieve all the attributes.
> ipa user-mod somerandomuser --setattr=employeenumber=1234 --all
> ipa user-show somerandomuser --all
>
>
> To add this to the CLI, you would need to modify the user object in
> your plugin. Something like:
>
> from ipalib.plugins import user
> from ipalib.parameters import Str
>
> user.takes_params = user.takes_params + (
> Str('employeenumber',
> cli_name='first',
did you mean
cli_name='employeenumber'
?
Copy paste?
> label=_('Employee number'),
> ),
> )
>
>> Moreover can i change the attribute just by name and make use of it.
>>
>> E.g. i found car license no really useful for staff so i want to change
>> the label to staff id card number
>
> You should ideally create a new LDAP attribute for this, but the label
> is defined in ipalib.plugins.user.
>
--
Thank you,
Dmitri Pal
Sr. Engineering Manager for IdM portfolio
Red Hat Inc.
-------------------------------
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
_______________________________________________
Freeipa-users mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/freeipa-users