[Date Prev][Date Next]
Are you really trying to achieve a MOD_ADD_IF_NOT_PRESENT or don't fail adding an attribute or value if the value is already present ?
MS AD has a PERMISSIVE MODIFY CONTROL that remove the ADD/DELETE constraints on the attributes and values, so that adding an attribute that exist will succeed but do nothing and similarly deleting an attribute or value that is not present succeed.
My 2 cents.
On May 26, 2010, at 3:53 PM, firstname.lastname@example.org wrote:
>>> I need to implement a modify operation whose semantics is "add if not
>>> present", an add that only takes place if that attribute is not yet
>>> present in the entry.
>>> I need it as an internal operation, so right now I wouldn't bother
>>> formalizing it as an extension of the semantics of the modify operation.
>>> Something like the SLAP_MOD_SOFTADD, which in turn consists in adding an
>>> attribute value only if that value is not already present.
>>> I'd introduce a SLAP_MOD_ADD_IF_NOT_PRESENT flag and add code to support
>>> it in all (well, most) backends/overlays that need to muck with modify
>>> operation type.
>>> Comments? Objections? p.
>> It might be a good idea to have a SOFTDEL as well; both are useful for
>> declarative modifications of data. Think of them in terms of:
>> Soft Add: The attribute shall contain at least these values, but might
>> have others
>> Soft Del: The attribute shall contain none of these values, but might have
>> Ideally as modify sub-operations.
> I'm not sure I understand how SOFTDEL differs from LDAP_MOD_DELETE. Do
> you mean that values listed in SOFTDEL will be deleted if they exist, or
> otherwise ignored?
Ludovic Poitou Sun Microsystems Inc.
OpenDS Community Manager Directory Services
http://blogs.sun.com/Ludo/ Grenoble Engineering Center - France
OpenDS, the Java LDAP Directory Server