[dev] Using OpenLDAP for prefs.

Edwin Culp eculp@encontacto.net
Tue, 16 Apr 2002 11:19:18 -0700


Quoting Jon Parise <jon@horde.org>:

<SNIP>
 
| The only problem with our implementation is that a non-existent
| attribute falls back to the default value, which may not necessarily
| be an empty string.

Jon,

I thought of one more possible option that I added at the end.  That always
happens after clicking on "send message":-).  
 
I apologize for not understanding but the only possibilities that I 
can visualize are:

  1. The attribute has not been modified so it isn't dirty and is
     ignored.
  2. The attribute has been modified and has a value which will be
     dirty and happily applied by ldap_modify just as the code is.
  3. The attribute has been modified to an empty value, for what ever
     reason, default or not,  It would then deleted by using
     ldap_mod_del using the original value.

The only change to current code is in number three.  

When rereading the values from the directory, anything that does not 
exist would be the same state as before making an assignation and I 
would think be fine.  If there is a default value that is not an
empty string, it could be assigned here and that would make it dirty
and would be be dirty and step 2 above would handle it.

I'm sure you are thinking of a specific example that I haven't been
able to visualize.  

Again I apologize for not getting it and for being a bit stubborn,maybe
as well as slow:-).

ed


| 
| > If an empty string is really needed, it can be assigned when reading
| > non-existent attributes from the directory and I would think that in
| > most cases it should work.
|  
| That would prevent the desired "fall back to the default" behavior
| that I mention above.
| 
| -- 
| Jon Parise (jon@csh.rit.edu)  .  Information Technology (2001)
| http://www.csh.rit.edu/~jon/  :  Computer Science House Member
| 
| -- 
| Horde developers mailing list
| Frequently Asked Questions: http://horde.org/faq/
| To unsubscribe, mail: dev-unsubscribe@lists.horde.org
| 

-------------------------------------------------------------
 http://insourcery.com - Mergence of Business and Technology  
          a "Griffin Plaza Partners, LLC" Company

-- 
Horde developers mailing list
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: dev-unsubscribe@lists.horde.org


-------------------------------------------------------------
 http://insourcery.com - Mergence of Business and Technology  
          a "Griffin Plaza Partners, LLC" Company