The shib config allows you to use any patron field for matching. Email is sometimes used, but Koha does not enforce uniqueness here. We call 'find' to get the patron, this will throw an error, but not fail We should 'search' instead and fail explicitly if there is more than one patron
Created attachment 95546 [details] [review] Bug 24065: Fail shib login if multiple users matched Ideally you could test against active shib, but is a small code change and covered by tests and should be readable To test: prove -v t/Auth_with_shibboleth.t
Created attachment 95562 [details] [review] Bug 24065: Fail shib login if multiple users matched Ideally you could test against active shib, but is a small code change and covered by tests and should be readable To test: prove -v t/Auth_with_shibboleth.t Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Created attachment 95648 [details] [review] Bug 24065: Fail shib login if multiple users matched Ideally you could test against active shib, but is a small code change and covered by tests and should be readable To test: prove -v t/Auth_with_shibboleth.t Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
I still do not understand why we stick to Test::DBIx::Class to test changes like this. Obviously we need a borrowers database here ;) Even more, if we use C4::Context in a t script (like this one), it makes not much sense. The theoretical benefit of Test::DBIx::Class is imo not in balance with its *horrible* installation..
Nice work! Pushed to master for 19.11.00