2

I'm working with FreeIPA and I've extended its attributes successfully, but noticed that the verification function in the Python plugin, added to FreeIPA, only works for the values entered through the command line. Values entered through the web UI are stored as is without verification.

Therefore, I was wondering about adding the following modifications to the server:

  1. Enable the FreeIPA web UI to verify the attribute value before storing it.
  2. Create a new syntax type to be used by LDAP (such a syntax for the blood type).
  3. Change the attribute's textbox in the web UI to a dropdown list.

1 Answer 1

2
  1. For enabling the WebUI to verify the user input, it's not required since the verification can be done by the verification function in the FreeIPA Python plugin (I just needed to reboot my server for the changes to take effect).
  2. There is no need for me to create a new syntax, I wanted it as a replacement to the verification process and since it's working it is not necessary.
  3. To change an attribute field type you need to add "$type" when creating the new attribute field in the javascript file:

create a text area:

section.fields.push({
     $type:'textarea',
     name: 'ldap_attribute_name',
     label: 'some label name'
});

create a dropdown menu:

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'
});

create a radio 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'
});

you can check for more options by digging the /usr/share/ipa/ui/js/freeipa/app.js file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .