Bug 10029 - CAS authentication fails in OPAC reserve
If OPAC reserve page is accessed without being logged-in, login form is displayed as well as a CAS authentication link (if enabled). A click on this link will lead to CAS server but one comming back to Koha, page shows an error : "ERROR: No biblionumber received". This is because CAS link only contains the query path "/cgi-bin/koha/opac-reserve.pl", not the query parameters. This patch adds query parameters to URI sent to CAS. Test plan : - Enable CAS - Go to opac without been logged-in - Try to place hold on a record => You get to /cgi-bin/koha/opac-reserve.pl?biblionumber=XXX showing authentication page => Check that CAS link contains query param "biblionumber" - Click on CAS link and log in => Check you return well logged-in to reserve page with biblionumber param Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> I have followed the test plan as far as I could and the links contain the biblionumber now, which they didn't before. I couldn't check the CAS login, but my normal login worked as expected. All tests and the QA script pass. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
93aee04405
commit
974ab561ef
|
|
@ -91,10 +91,8 @@ sub login_cas {
|
|||
sub login_cas_url {
|
||||
|
||||
my ($query, $key) = @_;
|
||||
my $uri = C4::Context->preference('OPACBaseURL') . $query->script_name();
|
||||
my $uri = C4::Context->preference('OPACBaseURL') . $query->url( -absolute => 1, -query => 1 );
|
||||
my $casparam = $query->param('cas');
|
||||
# FIXME: This should be more generic and handle whatever parameters there might be
|
||||
$uri .= "?cas=" . $casparam if (defined $casparam);
|
||||
$casparam = $defaultcasserver if (not defined $casparam);
|
||||
$casparam = $key if (defined $key);
|
||||
my $cas = Authen::CAS::Client->new($casservers->{$casparam});
|
||||
|
|
|
|||
Loading…
Reference in New Issue