Can I store custom properties for users if the users come from ldap ?

Can I store custom properties for users if the users come from ldap ?

I need to be able to store some custom properties on users and I don't want to add those properties in LDAP. For example I need to disable a user in my project although it still exists in LDAP.

0 votes

2 answers

1303 views

ANSWER

Maybe I didn't formulate my question very clearly.

I need to store properties that are not in LDAP. The user directory is defined in LDAP with mapping and everything, but I need some properties of the user to be stored in SQL.

10/07/2011



It is possible map arbitrary string properties to LDAP attributes by defining your own schema instead of the default “user” schema definition (and the matching layout if you want to make those property editable from the web UI in the Admin Center).

Edit: I misread the original question. If you don't want to store the custom properties in the LDAP you can use a MultiDirectory to merge entries that come from a LDAP and SQL directory. You will still need to define your own schema and layout to do so.

1 votes



Hi,

There is another solution, with the new module in 5.5 release: “social collaboration”. You will find in this module the rich profile feature. For each user, you will have the possibility to store other information in a nuxeo document for ones not stored into your user directory (birthdate, company name, gender, phone number, …).

Like other Nuxeo Document type, we define a list of schema this Nuxeo Document type will implement and a layout… Finally you will have something like that:

alt text

This screenshot presents the default layout proposed by Social Collaboration. And here is the edition view:

alt text

You will have the possibility to declare your own schema and layout associated that will be added into these view.

  • When you install your Nuxeo select Nuxeo DM and Social Collaboration.
  • About adding your own layout (with Studio for instance), you just have to override “summary_user_profile_layout” defined like that (don't forget to require “org.nuxeo.ecm.social.user.profile.layout.config” if you don't create with Studio):

Here is the XML fragment example:

  <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
    point="layouts">
    <layout name="summary_user_profile_layout">
      <templates>
        <template mode="any">/layouts/layout_summary_template.xhtml</template>
      </templates>
      <rows>
        <row>
          <widget>summary_user_profile</widget>
        </row>
        <row>
          <widget>summary_user_relationship</widget>
          <widget>summary_user_mini_messages</widget>
          <widget>summary_user_activity_stream</widget>
        </row>
      </rows>
    </layout>
  </extension>
1 votes



Thanks for your answer Benjamin. This looks like what we were looking for.

With which version of Nuxeo will this be available ?

10/07/2011

You should use the "comment" button instead of writing an answer for each sub-questions. Please delete your answers and rewrite them as comments to the matching answer such that future readers can understand the flow of comments.
10/07/2011

This is available in the trunk and will be available for the next Nuxeo version.
10/11/2011

This is now available, you don't need to build the Social Collaboration feature now, as this is integrated into the installer. I changed my answer accordingly.
12/20/2011