Nuxeo Server

How to Add Custom LDAP Fields to the UI

This page is scheduled for review and update. Check back soon for updated content!

To add a custom LDAP fields to the User interface you have to:

  1. Create a custom schema based on nuxeo's user.xsd schema with custom fields related to the fields in your LDAP system.


     <?xml version="1.0"?>
     <xs:schema xmlns:xs=""
      <xs:include schemaLocation="base.xsd" />
      <xs:element name="username" type="xs:string" />
      <xs:element name="password" type="xs:string" />
      <xs:element name="email" type="xs:string" />
      <xs:element name="firstName" type="xs:string" />
      <xs:element name="lastName" type="xs:string" />
      <xs:element name="company" type="xs:string" />
      <!-- your custom telephone field -->
      <xs:element name="telephone" type="xs:string" />
      <xs:element name="groups" type="nxs:stringList" />

  2. Add your schema via Nuxeo's extension system.


     <?xml version="1.0"?>
     <component name="com.example.myproject.myuser.schema">
      <extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
        <schema name="myuser" src="schemas/myuser.xsd" />

  3. Modify your LDAP configuration file in Nuxeo (default-ldap-users-directory-bundle.xml) to include:

    1. your custom schema,


        <extension target=""
          <directory name="userDirectory">
            <!-- association between your custom schema and the directory -->

    2. mapping between your schema and your LDAP fields.

      default-ldap-users-directory-bundle.xml (continued)

            <fieldMapping name="username">uid</fieldMapping>
            <fieldMapping name="password">userPassword</fieldMapping>
            <fieldMapping name="firstName">givenName</fieldMapping>
            <fieldMapping name="lastName">sn</fieldMapping>
            <fieldMapping name="company">o</fieldMapping>
            <fieldMapping name="email">mail</fieldMapping>
            <fieldMapping name="telephone">telephoneNumber</fieldMapping>

  4. Modify the UI.

    1. Add your custom widget to the layout.


       <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
          <layout name="user">
              <template mode="any">/layouts/layout_default_template.xhtml</template>
            <!-- your custom telephone widget-->

    2. Define a new widget for your custom field to be used in the layout above.


       <widget name="telephone" type="text">
       <label mode="any">telephone</label>
       <field schema="myuser">telephone</field>
       <mode value="editPassword">hidden</mode>
       <properties widgetMode="edit">
       <property name="required">true</property>
       <property name="styleClass">dataInputText</property>




4 months ago Manon Lumeau add tags for doc days
4 months ago Manon Lumeau Update tags for doc days
4 months ago manonlumeau Added content-review-lts2017 label
5 months ago manonlumeau NXDOC-1346-FT review screenshot
2 years ago Solen Guitter 12
2 years ago Manon Lumeau 11
3 years ago Solen Guitter 10
4 years ago Solen Guitter 9
5 years ago Solen Guitter 8
5 years ago Solen Guitter 7 | Added related pages
7 years ago Florent Guillaume 5
7 years ago Florent Guillaume 6 | Migrated to Confluence 4.0
7 years ago Wojciech Sulejman 4
7 years ago Wojciech Sulejman 3
7 years ago Wojciech Sulejman 2
7 years ago Wojciech Sulejman 1
History: Created by Wojciech Sulejman

We'd love to hear your thoughts!

All fields required