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

(-)a/C4/Auth.pm (+7 lines)
Lines 1325-1330 sub checkauth { Link Here
1325
    }
1325
    }
1326
1326
1327
    if ($shib) {
1327
    if ($shib) {
1328
        #If shibOnly is enabled just go ahead and redirect directly
1329
        if ( (($type eq 'opac') && C4::Context->preference('opacShibOnly')) || (($type ne 'opac') && C4::Context->preference('staffShibOnly')) ) {
1330
            my $redirect_url = login_shib_url( $query );
1331
            print $query->redirect($redirect_url);
1332
            safe_exit;
1333
        }
1334
1328
        $template->param(
1335
        $template->param(
1329
            shibbolethAuthentication => $shib,
1336
            shibbolethAuthentication => $shib,
1330
            shibbolethLoginUrl       => login_shib_url($query),
1337
            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 177-179 Staff Client: Link Here
177
                  yes: Show
177
                  yes: Show
178
                  no: "Don't show"
178
                  no: "Don't show"
179
            - a search field pulldown for 'Search the catalog' boxes.
179
            - a search field pulldown for 'Search the catalog' boxes.
180
- 
180
    Authentication:
181
        -
182
            - pref: staffShibOnly
183
              choices:
184
                  yes: "Don't allow"
185
                  no: Allow
186
            - staff to login by means other than shibboleth.

Return to bug 18506