Maybe I should add plugin.
here is test.py
from ipaserver.plugins.user import user from ipalib.parameters import Str from ipalib.text import _ from ipaserver.plugins.internal import i18n_messages
user.takes_params += ( Str('host*', cli_name='host', label=_('Test host'), ), )
user.default_attributes.append('host')
and test.js
define([ 'freeipa/phases', 'freeipa/user'], function(phases, user_mod) { // helper function function get_item(array, attr, value) { for (var i=0,l=array.length; i<l; i++) { if (array[i][attr] === value) return array[i]; } return null; } var emp_plugin = {}; // adds 'host' field into user details facet emp_plugin.add_emp_number_pre_op = function() { var facet = get_item(user_mod.entity_spec.facets, '$type', 'details'); var section = get_item(facet.sections, 'name', 'identity'); section.fields.push({ $type: 'multivalued', name: 'host', label: 'Test host' });
return true; }; phases.on('customization', emp_plugin.add_emp_number_pre_op); return emp_plugin; });