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

(-)a/C4/Auth.pm (+9 lines)
Lines 903-908 sub checkauth { Link Here
903
                $info{'nopermission'} = 1;
903
                $info{'nopermission'} = 1;
904
                C4::Context->_unset_userenv($sessionID);
904
                C4::Context->_unset_userenv($sessionID);
905
                $loggedin = 0;
905
                $loggedin = 0;
906
                if (C4::Context->preference('InsufficientPermissionRedirectURL')) {
907
                    print $query->redirect(C4::Context->preference('InsufficientPermissionRedirectURL'));
908
                }
906
            }
909
            }
907
    }
910
    }
908
    elsif ( $emailaddress) {
911
    elsif ( $emailaddress) {
Lines 1011-1016 sub checkauth { Link Here
1011
                    $loggedin = 1;
1014
                    $loggedin = 1;
1012
                } else {
1015
                } else {
1013
                    $info{'nopermission'} = 1;
1016
                    $info{'nopermission'} = 1;
1017
                    if (C4::Context->preference('InsufficientPermissionRedirectURL')) {
1018
                        print $query->redirect(C4::Context->preference('InsufficientPermissionRedirectURL'));
1019
                    }
1014
                }
1020
                }
1015
            }
1021
            }
1016
        }
1022
        }
Lines 1140-1145 sub checkauth { Link Here
1140
                else {
1146
                else {
1141
                    $info{'nopermission'} = 1;
1147
                    $info{'nopermission'} = 1;
1142
                    C4::Context->_unset_userenv($sessionID);
1148
                    C4::Context->_unset_userenv($sessionID);
1149
                    if (C4::Context->preference('InsufficientPermissionRedirectURL')) {
1150
                        print $query->redirect(C4::Context->preference('InsufficientPermissionRedirectURL'));
1151
                    }
1143
                }
1152
                }
1144
                my ( $borrowernumber, $firstname, $surname, $userflags,
1153
                my ( $borrowernumber, $firstname, $surname, $userflags,
1145
                    $branchcode, $branchname, $branchprinter, $emailaddress );
1154
                    $branchcode, $branchname, $branchprinter, $emailaddress );
(-)a/installer/data/mysql/atomicupdate/bug_23920_-_new_syspref_InsufficientPermissionRedirectURL.sql (+1 lines)
Line 0 Link Here
1
INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('InsufficientPermissionRedirectURL', NULL, NULL, 'URL Koha will redirect to when patrons with insufficient permissions try to login to staff client', 'Textarea');
(-)a/installer/data/mysql/bug_23920_-_new_syspref_InsufficientPermissionRedirectURL.sql (+1 lines)
Line 0 Link Here
1
INSERT IGNORE INTO  systempreferences (variable, value, options, explanation, type) VALUES ('InsufficientPermissionRedirectURL', NULL, NULL, 'URL that koha will re-direct to after a patron with insufficient permissions tries logging into the staff client', 'Textarea');
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-2 / +3 lines)
Lines 227-233 Patrons: Link Here
227
               no: Allow all permitted users
227
               no: Allow all permitted users
228
         - "to access/change superlibrarian privileges."
228
         - "to access/change superlibrarian privileges."
229
         - "<br><strong>NOTE:</strong> A permitted user needs to have the 'permissions' flag (if no superlibrarian)."
229
         - "<br><strong>NOTE:</strong> A permitted user needs to have the 'permissions' flag (if no superlibrarian)."
230
230
     -
231
         - pref: InsufficientPermissionRedirectURL
232
         - Enter a URL which Koha will re-direct to if a patron with insufficient permissions tries to login the staff client
231
    Privacy:
233
    Privacy:
232
     -
234
     -
233
         - Use the following URL
235
         - Use the following URL
234
- 

Return to bug 23930