[Bug 6022] New: Auth_with_ldap check if categorycode is valid
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Bug #: 6022 Summary: Auth_with_ldap check if categorycode is valid Classification: Unclassified Change sponsored?: --- Product: Koha Version: rel_3_2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Authentication AssignedTo: gmcharlt@gmail.com ReportedBy: dpavlin@rot13.org QAContact: koha-bugs@lists.koha-community.org CC: dpavlin@rot13.org 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 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 --- Comment #1 from Dobrica Pavlinusic <dpavlin@rot13.org> 2011-03-31 13:18:53 UTC --- Created attachment 3572 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3572 check validity of categorycode when importing from ldap -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Patch Status|--- |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 --- Comment #2 from MJ Ray (software.coop) <mjr@ttllp.co.uk> 2011-04-07 10:50:51 UTC --- This bug is mentioned in: Bug 6022: Auth_with_ldap check if categorycode is valid http://lists.koha-community.org/pipermail/koha-patches/2011-March/014397.htm... -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|gmcharlt@gmail.com |dpavlin@rot13.org -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> 2011-05-17 10:34:33 UTC --- Created attachment 4140 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=4140 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 Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3572|0 |1 is obsolete| | -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com Patch Status|Signed Off |Failed QA --- Comment #4 from Paul Poulain <paul.poulain@biblibre.com> 2011-08-09 15:18:20 UTC --- QA comment I have some comments, 2 of them being blockers : + # XXX check if categorycode exists, if not, fallback to default from koha-conf.xml 1 why XXX at the beginning of the comment ? (not blocking, i'm just surprised. ++ for the comment though + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare("SELECT categorycode FROM categories WHERE upper(categorycode) = upper(?)"); 2 Why upped in SQL ? It's useless, as SQL don't care with uc/lc or diacritics. categorycodes are automatically UCed, so I think it would be better to : * UC the $borrower{'categorycode'} * do SQL query without upped() + $sth->execute( $borrower{'categorycode'} ); + if ( my $row = $sth->fetchrow_hashref ) { 3 Why an empty IF then ELSE ? UNLESS would have done the job ! + + } else { + my $default = $mapping{'categorycode'}->{content}; + warn "Can't find ", $borrower{'categorycode'}, " default to: $default for ", $borrower{userid}; 4 UNCONDITIONAL WARN detected. If you want to add a warn (which is OK), please use $DEBUG && warn "blabla..."; Thus the warn will be issued only if you're in DEBUG mode (set in httpd.conf) + $borrower{'categorycode'} = $default + } Sorry, but failed QA for reasons 2 and 4 (and 3 should be fixed as well, but I wouldn't fail QA just for reason 3) -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |major --- Comment #5 from Paul Poulain <paul.poulain@biblibre.com> 2011-08-09 15:18:54 UTC --- I see it's written "ENH" => nope, it's a bug. And a major one according to me. So upgrading severity -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 --- Comment #6 from Dobrica Pavlinusic <dpavlin@rot13.org> 2011-08-12 17:28:54 UTC --- Created attachment 4985 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=4985 Bug 6022: Auth_with_ldap check if categorycode is valid Cleanup required by QA -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #4140|0 |1 is obsolete| | -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Failed QA |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 --- Comment #7 from Dobrica Pavlinusic <dpavlin@rot13.org> 2011-11-24 14:53:46 UTC --- Created attachment 6391 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6391 Bug 6022: Auth_with_ldap check if categorycode is valid added test scenario. 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 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #4985|0 |1 is obsolete| | -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Marijana <mglavica@ffzg.hr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6391|0 |1 is obsolete| | --- Comment #8 from Marijana <mglavica@ffzg.hr> 2011-11-24 15:13:46 UTC --- Created attachment 6392 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6392 Bug 6022: Auth_with_ldap check if categorycode is valid Signed-off-by: Marijana Glavica <mglavica@ffzg.hr> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Marijana <mglavica@ffzg.hr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mglavica@ffzg.hr Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Patch Pushed --- Comment #9 from Paul Poulain <paul.poulain@biblibre.com> 2011-12-06 18:52:28 UTC --- QA comment: * code is OK, clean, commented * I've tested that without LDAP, nothing has changed Patch pushed, please test -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|rel_3_2 |rel_3_6 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6022 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #10 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Included in 3.6 prior to 3.6.5. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org