[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Uniqueness constraint over multiple attributes



On 06/20/2012 06:43 PM, Michael Ströder wrote:
Jan Beerden wrote:
Is there a way to have a unique constraint over multiple attributes? We have
different attributes for the primary email address of a person, and for
additional aliases, and we'd like to enforce global uniqueness in such a way
that the primary email address for one person can not be used as an email
alias for another person.

The slapo-unique manpage doesn't make this very clear.
You can simply specify multiple attrs.

Example for old syntax:

unique_attributes uid uidNumber

Based on LDAP URLs:

unique_uri "ldap:///o=myorg?uid,uidNumber?sub?(objectClass=*)"

IIRC there's a bug with filters in unique_uri.

Ciao, Michael.

We already tried that. We are trying to prevent user1 to have an email alias that is the same as user2's primary email address. With this it only make sure that an email address can exist only once in the email attribute and that an alias can exist only once in the alias attribute. What we would like is that a certain value (email address) has to be unique across both the email and the alias attribute.

Regards

Jan Beerden                                   jan.beerden@fks.be
fks bvba - Formal and Knowledge Systems       http://www.fks.be/
Schampbergstraat 32                           Tel:  ++32-(0)11-21 49 11
B-3511 Kuringen                               Fax:  ++32-(0)11-22 04 19