On 09/04/2017 07:54 AM, Prashant M. Bapat via FreeIPA-users wrote:
Hi All,
Hi Prashant,
I wanted to add a custom attribute to user. I followed the freeipa
extension guide here
http://www.freeipa.org/images/5/5b/FreeIPA33-extending-freeipa.pdf
So far I have add this to the LDAP schema and added a custom python
code to /usr/lib/python2.7/site-packages/ipaserver/plugins/.
With this the CLI part is working fine.
The new attribute (say "favoritecolorname") should be mandatory for
all users. I want the "user_add" call to validate the string using a
regex. This works perfectly! I used this guide
https://abbra.fedorapeople.org/guide.html
I'm stuck with chaning the User Add dialog in Web UI. I need this new
atribute "favoritecolor" to be mandatory. Is there any sample code on
chaning the default user add dialog ?
You can take a look here:
https://pvoborni.fedorapeople.org/plugins/employeenumber/employeenumber.js
. Only thing you need to change is to find fields using:
var fields = user_mod.entity_spec.adder_dialog.sections[1].fields;
and then push new field into the section:
var fields.push({field_spec});
In this case you also don't need helper function.
That should work, in case you have any other troubles let me know.
Any pointers would be great.
Thanks.
--Prashant
_______________________________________________
FreeIPA-users mailing list -- freeipa-users(a)lists.fedorahosted.org
To unsubscribe send an email to freeipa-users-leave(a)lists.fedorahosted.org
--
Pavel^3 Vomacka