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

(-)a/C4/Auth.pm (+7 lines)
Lines 1297-1302 sub checkauth { Link Here
1297
    }
1297
    }
1298
1298
1299
    if ($shib) {
1299
    if ($shib) {
1300
        #If shibOnly is enabled just go ahead and redirect directly
1301
        if ( (($type eq 'opac') && C4::Context->preference('opacShibOnly')) || (($type ne 'opac') && C4::Context->preference('staffShibOnly')) ) {
1302
            my $redirect_url = login_shib_url( $query );
1303
            print $query->redirect($redirect_url);
1304
            safe_exit;
1305
        }
1306
        
1300
        $template->param(
1307
        $template->param(
1301
            shibbolethAuthentication => $shib,
1308
            shibbolethAuthentication => $shib,
1302
            shibbolethLoginUrl       => login_shib_url($query),
1309
            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 823-825 OPAC: Link Here
823
            - "The patron should see the charge description as "
823
            - "The patron should see the charge description as "
824
            - pref: PayPalChargeDescription
824
            - pref: PayPalChargeDescription
825
              class: long
825
              class: long
826
    Authentication:
827
        -
828
            - pref: opacShibOnly
829
              choices:
830
                  yes: "Don't allow"
831
                  no: Allow
832
            - 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 155-157 Staff Client: Link Here
155
                  yes: Show
155
                  yes: Show
156
                  no: "Don't show"
156
                  no: "Don't show"
157
            - a search field pulldown for 'Search the catalog' boxes.
157
            - a search field pulldown for 'Search the catalog' boxes.
158
- 
158
    Authentication:
159
        -
160
            - pref: staffShibOnly
161
              choices:
162
                  yes: "Don't allow"
163
                  no: Allow
164
            - staff to login by means other than shibboleth.

Return to bug 18506