我正在使用FreeIPA,并且已经成功扩展了它的属性,但是注意到Python插件中添加到FreeIPA中的validationfunction仅适用于通过命令行input的值。 通过networking用户界面input的值按原样存储,无需validation。
因此,我想知道将下列修改添加到服务器:
创build一个文本区域:
section.fields.push({ $type:'textarea', name: 'ldap_attribute_name', label: 'some label name' });
创build一个下拉菜单:
section.fields.push({ $type:'entity_select', other_entity:'user', // get the users list other_field:'uid', // get the user IDs and display them in the list name: 'ldap_attribute_name', label: 'some label name' });
创build一个单选button:
section.fields.push({ $type:'radio', options:[ // create the new radio buttons {label:'first button label',value:'first button value'}, {label:'second button label',value:'second button value'} ], name: 'ldap_attribute_name', label: 'some label name' });
您可以通过挖掘/usr/share/ipa/ui/js/freeipa/app.js文件来检查更多选项。