[Koha-devel] LDAP replication without update

Dobrica Pavlinusic dpavlin at rot13.org
Mon Mar 16 12:49:52 CET 2009


Let me quickly explain our situation: we want to get data from ldap for
new users, but allow librarians to edit data in Koha, and preserve this
changes.

Logical solution would be to turn replication on, and update off in
/etc/koha/koha-conf.xml with something like this:

 <replicate>1</replicate>  <!-- add new users from LDAP to Koha database -->
 <update>0</update>        <!-- update existing users in Koha database -->

but that doesn't work. I tracked problem to || 1 in Auth_with_ldap.pm
which always turn both options on no matter what user specifies in xml
file. Attached patch fixes this problem.


We also needed to augment data available in LDAP with data from CSV
files generated by other systems, so I wrote ldap rewriter documented in
following blog post:

http://blog.rot13.org/2009/03/virtual_ldap_rewrite_or_augment_data_on_the_fly.html

It's somewhat specific for our needs, but I hope that it will also be
useful to other as food for thought if nothing else.

-- 
Dobrica Pavlinusic               2share!2flame            dpavlin at rot13.org
Unix addict. Internet consultant.             http://www.rot13.org/~dpavlin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: koha-ldap-replicate_without_update.diff
Type: text/x-diff
Size: 962 bytes
Desc: not available
URL: </pipermail/koha-devel/attachments/20090316/117011ab/attachment-0003.diff>


More information about the Koha-devel mailing list