]> git.koha-community.org Git - koha.git/commit
Bug 6022: Auth_with_ldap check if categorycode is valid
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 31 Mar 2011 13:14:46 +0000 (15:14 +0200)
committerChris Nighswonger <chris.nighswonger@gmail.com>
Tue, 6 Dec 2011 19:10:33 +0000 (14:10 -0500)
commitcaf31bb5dd08712d7faf44b2ed2455192295f79a
tree4b0b9ea6893a449cb0821fb1f286b83a4821cea6
parentd9d0e0a5c829e582ab1f67898b32d664d11a1994
Bug 6022: Auth_with_ldap check if categorycode is valid

When importing users from LDAP, Auth_with_ldap.pm doesn't check if value for
categorycode is present in categories table in Koha resulting in referential
integrity error instead of using default value from koha-conf.xml

Test scenario:
1. enable LDAP in koha-conf.xml using <useldapserver>1</useldapserver>
   and add <ldapserver> configuration with
   <categorycode is="SomeLDAPField">DefaultCategoryCode</categorycode>
2. select/create LDAP user with category in SomeLDAPField which isn't in
   Koha
3. try logging in and ensure that assigned category to new user is
   DefaultCategoryCode

Signed-off-by: Marijana Glavica <mglavica@ffzg.hr>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 0352a8f24ac72b7dfbf84ea3c6f11e2e714708b0)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
C4/Auth_with_ldap.pm