View | Details | Raw Unified | Return to bug 8446
Collapse All | Expand All

(-)a/C4/Auth.pm (-5 / +13 lines)
Lines 298-308 sub get_template_and_user { Link Here
298
    }
298
    }
299
    else {    # if this is an anonymous session, setup to display public lists...
299
    else {    # if this is an anonymous session, setup to display public lists...
300
300
301
	# If shibboleth is enabled, and we have a shibboleth login attribute,
301
	# If shibboleth is enabled, and we're in an anonymous session, we should allow
302
	# but we are in an anonymouse session, we clearly have an invalid
302
    # the user to attemp login via shibboleth.
303
	# Shibboleth account.
303
	if ( $shib ) {
304
	if ( $shib && $shib_login ) {
304
	    $template->param( shibbolethAuthentication => $shib,
305
	    $template->param( invalidShibLogin => '1');
305
                shibbolethLoginUrl    => login_shib_url($in->{'query'}),
306
            );
307
            # If shibboleth is enabled and we have a shibboleth login attribute,
308
            # but we are in an anonymous session, then we clearly have an invalid
309
            # shibboleth koha account.
310
            if ( $shib_login ) {
311
                $template->param( invalidShibLogin => '1');
312
            }
306
        }
313
        }
307
314
308
        $template->param( sessionID        => $sessionID );
315
        $template->param( sessionID        => $sessionID );
Lines 1176-1181 sub checkauth { Link Here
1176
1183
1177
    if ($shib) {
1184
    if ($shib) {
1178
            $template->param(
1185
            $template->param(
1186
                shibbolethAuthentication => $shib,
1179
                shibbolethLoginUrl    => login_shib_url($query),
1187
                shibbolethLoginUrl    => login_shib_url($query),
1180
            );
1188
            );
1181
    }
1189
    }
(-)a/opac/opac-main.pl (-9 lines)
Lines 21-27 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI;
22
use CGI;
23
use C4::Auth;    # get_template_and_user
23
use C4::Auth;    # get_template_and_user
24
use C4::Auth_with_shibboleth qw( login_shib_url );
25
use C4::Output;
24
use C4::Output;
26
use C4::NewsChannels;    # GetNewsToDisplay
25
use C4::NewsChannels;    # GetNewsToDisplay
27
use C4::Languages qw(getTranslatedLanguages accept_language);
26
use C4::Languages qw(getTranslatedLanguages accept_language);
Lines 45-57 $template->param( Link Here
45
    casAuthentication   => $casAuthentication,
44
    casAuthentication   => $casAuthentication,
46
);
45
);
47
46
48
if ( C4::Context->config('useshibboleth') ) {
49
    $template->param(
50
        shibbolethAuthentication => C4::Context->config('useshibboleth'),
51
        shibbolethLoginUrl => C4::Auth_with_shibboleth::login_shib_url($input)
52
    );
53
};
54
55
# display news
47
# display news
56
# use cookie setting for language, bug default to syspref if it's not set
48
# use cookie setting for language, bug default to syspref if it's not set
57
my ($theme, $news_lang, $availablethemes) = C4::Templates::themelanguage(C4::Context->config('opachtdocs'),'opac-main.tt','opac',$input);
49
my ($theme, $news_lang, $availablethemes) = C4::Templates::themelanguage(C4::Context->config('opachtdocs'),'opac-main.tt','opac',$input);
58
- 

Return to bug 8446