On 02/06/2014 11: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', > 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. >
Petr3, can you please also add a Web UI plugin example how to add this field to Web UI user's page to Employee section? Just to have the example complete. Thanks, Martin _______________________________________________ Freeipa-users mailing list [email protected] https://www.redhat.com/mailman/listinfo/freeipa-users
