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

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