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

(-)a/C4/Auth.pm (+7 lines)
Lines 1319-1324 sub checkauth { Link Here
1319
    }
1319
    }
1320
1320
1321
    if ($shib) {
1321
    if ($shib) {
1322
        #If shibOnly is enabled just go ahead and redirect directly
1323
        if ( (($type eq 'opac') && C4::Context->preference('opacShibOnly')) || (($type ne 'opac') && C4::Context->preference('staffShibOnly')) ) {
1324
            my $redirect_url = login_shib_url( $query );
1325
            print $query->redirect($redirect_url);
1326
            safe_exit;
1327
        }
1328
1322
        $template->param(
1329
        $template->param(
1323
            shibbolethAuthentication => $shib,
1330
            shibbolethAuthentication => $shib,
1324
            shibbolethLoginUrl       => login_shib_url($query),
1331
            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 880-882 OPAC: Link Here
880
            - "The patron should see the charge description as "
880
            - "The patron should see the charge description as "
881
            - pref: PayPalChargeDescription
881
            - pref: PayPalChargeDescription
882
              class: long
882
              class: long
883
    Authentication:
884
        -
885
            - pref: opacShibOnly
886
              choices:
887
                  yes: "Don't allow"
888
                  no: Allow
889
            - 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 181-183 Staff Client: Link Here
181
                  yes: Show
181
                  yes: Show
182
                  no: "Don't show"
182
                  no: "Don't show"
183
            - a search field pulldown for 'Search the catalog' boxes.
183
            - a search field pulldown for 'Search the catalog' boxes.
184
- 
184
    Authentication:
185
        -
186
            - pref: staffShibOnly
187
              choices:
188
                  yes: "Don't allow"
189
                  no: Allow
190
            - staff to login by means other than shibboleth.

Return to bug 18506