I have added a draft implementation of a method to convert cn (i.e.
Public name) to sn and givenName. [1]

Processing is currently very simplistic, but it should be sufficient
to allow LDAP entries to be created, regardless of how many words are
present in the Public name.

Note that givenName is returned as an array (may be empty). This is
because givenName is an optional attribute which may appear multiple
times. It remains to be seen whether we want to create multiple
attributes, or whether it is more appropriate to add at most one
attribute containing all the givenName values.

I suggest that others look at the tests [2] and add more to see if the
behaviour is as desired. The draft status can then be removed for use
in workbench code.

[1] 
https://github.com/apache/whimsy/blob/cf561d92e7b3943b17e9d78bd4c5f5482628360d/lib/whimsy/asf/person.rb#L177
[2] https://github.com/apache/whimsy/blob/master/lib/spec/lib/person_spec.rb

Reply via email to