Project

General

Profile

Actions

Feature #24

closed

Add some mappings from VCard to LDAP

Added by Andreas Vitting over 3 years ago. Updated over 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Target version:
-
Start date:
10/23/2020
Due date:
% Done:

0%

Estimated time:

Description

VCard specifies also
ROLE in company (LDAP ?)
ORG with department (LDAP department?)
N with prefix (LDAP personalTitle?) and suffix (AD generationQualifier?)

Is it possible to add those too?

Actions #1

Updated by Jörg Ebeling over 3 years ago

Yes, it's already in.
Please check section "[ldap.map...] = LDAP/CardDav mapping" of Readme as well as the config.sample of the package file.
Within the config.sample you see the current default mapping in commented form. If you wanna change something of it, simple copy the relevant mapping to your config and adapt as you like.

Actions #2

Updated by Andreas Vitting over 3 years ago

Hm, If I look into first read from CARDDAV server (debug), nothing of those is mapped by default.
Just looked again ;-)

Example
N:Müller;Klaus;;Dr.;hc
only sn = Müller and givenName = Klaus mapped, Dr. and hc is not mapped...

Next one
Microsoft,Support
results in
company = Microsoft; but no department.

Perhaps I did'n get your point, but to which LDAP field is prefix and suffix mapped?
;[ldap.map.??]
;dav = N
;index = 3

;[ldap.map.??]
;dav = N
;index = 4

And which ldap fields I can choose? Every name?

Actions #3

Updated by Jörg Ebeling over 3 years ago

Yes, you can choose any valid LDAP name, whereas valid only means that they must not contain dashes or some of the other forbidden LDAP characters, but take into account that ldap names are case sensitive!

With your cardDav sample:

N:Müller;Klaus;;Dr.;hc

"sn" and "givenName" already have a default mapping as shown in config.sample.
If you're now i.e. also interested in "Dr." and wanna get it in LDAP attribute "title", adding the following to your config should do the trick:

[ldap.map.title]
dav = N
index = 3

Which means the fourth (index=3 because count starts by 0) ";" separated entry of vCards "N" field shall be mapped to LDAPs "title" attribute.
Place it into your config, restart L2CPBG, add it to your phones config i.e. "LDAP Display Name = %cn %company %title" should do it ;-)

Does it work as expected?

Actions #4

Updated by Andreas Vitting over 3 years ago

..in addition.

Jut tried in config file

[ldap.map.initials]
dav = N
index = 2
;
[ldap.map.personalTitle]
dav = N
index = 3
;
[ldap.map.generationQualifier]
dav = N
index = 4

none of them worked.

Actions #5

Updated by Andreas Vitting over 3 years ago

Just tried it again. There was an "error?" in VCard, which contains only CR, not CRLF. After correction config file and all ldap mappings worked as expected.
So no "new feature" needed.

Actions #6

Updated by Jörg Ebeling over 3 years ago

  • Status changed from New to Rejected

Quite cool.

Actions

Also available in: Atom PDF

Go to top