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

(-)a/C4/Auth.pm (+7 lines)
Lines 1324-1329 sub checkauth { Link Here
1324
    }
1324
    }
1325
1325
1326
    if ($shib) {
1326
    if ($shib) {
1327
        #If shibOnly is enabled just go ahead and redirect directly
1328
        if ( (($type eq 'opac') && C4::Context->preference('opacShibOnly')) || (($type ne 'opac') && C4::Context->preference('staffShibOnly')) ) {
1329
            my $redirect_url = login_shib_url( $query );
1330
            print $query->redirect($redirect_url);
1331
            safe_exit;
1332
        }
1333
1327
        $template->param(
1334
        $template->param(
1328
            shibbolethAuthentication => $shib,
1335
            shibbolethAuthentication => $shib,
1329
            shibbolethLoginUrl       => login_shib_url($query),
1336
            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