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

(-)a/C4/Auth.pm (+7 lines)
Lines 1311-1316 sub checkauth { Link Here
1311
    }
1311
    }
1312
1312
1313
    if ($shib) {
1313
    if ($shib) {
1314
        #If shibOnly is enabled just go ahead and redirect directly
1315
        if ( (($type eq 'opac') && C4::Context->preference('opacShibOnly')) || (($type ne 'opac') && C4::Context->preference('staffShibOnly')) ) {
1316
            my $redirect_url = login_shib_url( $query );
1317
            print $query->redirect($redirect_url);
1318
            safe_exit;
1319
        }
1320
1314
        $template->param(
1321
        $template->param(
1315
            shibbolethAuthentication => $shib,
1322
            shibbolethAuthentication => $shib,
1316
            shibbolethLoginUrl       => login_shib_url($query),
1323
            shibbolethLoginUrl       => login_shib_url($query),
(-)a/installer/data/mysql/atomicupdate/shibOnly.perl (+6 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( "INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('opacShibOnly','0','If ON enables shibboleth only authentication for the opac','','YesNo'),('staffShibOnly','0','If ON enables shibboleth only authentication for the staff client','','YesNo')" );
4
    SetVersion( $DBversion );
5
    print "Upgrade to $DBversion done (Bug XXXXX - shibOnly preferences)\n";
6
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+7 lines)
Lines 824-826 OPAC: Link Here
824
            - "The patron should see the charge description as "
824
            - "The patron should see the charge description as "
825
            - pref: PayPalChargeDescription
825
            - pref: PayPalChargeDescription
826
              class: long
826
              class: long
827
    Authentication:
828
        -
829
            - pref: opacShibOnly
830
              choices:
831
                  yes: "Don't allow"
832
                  no: Allow
833
            - patrons to login by means other than Shibboleth.
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref (-1 / +7 lines)
Lines 167-169 Staff Client: Link Here
167
                  yes: Show
167
                  yes: Show
168
                  no: "Don't show"
168
                  no: "Don't show"
169
            - a search field pulldown for 'Search the catalog' boxes.
169
            - a search field pulldown for 'Search the catalog' boxes.
170
- 
170
    Authentication:
171
        -
172
            - pref: staffShibOnly
173
              choices:
174
                  yes: "Don't allow"
175
                  no: Allow
176
            - staff to login by means other than shibboleth.

Return to bug 18506