Bugzilla – Attachment 94894 Details for
Bug 23930
No permissions SSO login to staff client should redirect to a custom URL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23930: Implemented syspref where you can configure URL re-directed to whena patron with insufficient permissions tries to login to the staff client
Bug-23930-Implemented-syspref-where-you-can-config.patch (text/plain), 4.49 KB, created by
Alex Buckley
on 2019-10-31 00:29:09 UTC
(
hide
)
Description:
Bug 23930: Implemented syspref where you can configure URL re-directed to whena patron with insufficient permissions tries to login to the staff client
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2019-10-31 00:29:09 UTC
Size:
4.49 KB
patch
obsolete
>From e0c82e02f1f37921e96e700f5390d2517f4722d3 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Thu, 31 Oct 2019 00:17:25 +0000 >Subject: [PATCH] Bug 23930: Implemented syspref where you can configure URL > re-directed to whena patron with insufficient permissions tries to login to > the staff client > >Sponsored-by: Waikato Institute of Technology, New Zealand >--- > C4/Auth.pm | 9 +++++++++ > ...bug_23920_-_new_syspref_InsufficientPermissionRedirectURL.sql | 1 + > ...bug_23920_-_new_syspref_InsufficientPermissionRedirectURL.sql | 1 + > .../intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref | 4 +++- > 4 files changed, 14 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_23920_-_new_syspref_InsufficientPermissionRedirectURL.sql > create mode 100644 installer/data/mysql/bug_23920_-_new_syspref_InsufficientPermissionRedirectURL.sql > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index cbfccb14bf..8aa053fb39 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -903,6 +903,9 @@ sub checkauth { > $info{'nopermission'} = 1; > C4::Context->_unset_userenv($sessionID); > $loggedin = 0; >+ if (C4::Context->preference('InsufficientPermissionRedirectURL')) { >+ print $query->redirect(C4::Context->preference('InsufficientPermissionRedirectURL')); >+ } > } > } > elsif ( $emailaddress) { >@@ -1011,6 +1014,9 @@ sub checkauth { > $loggedin = 1; > } else { > $info{'nopermission'} = 1; >+ if (C4::Context->preference('InsufficientPermissionRedirectURL')) { >+ print $query->redirect(C4::Context->preference('InsufficientPermissionRedirectURL')); >+ } > } > } > } >@@ -1140,6 +1146,9 @@ sub checkauth { > else { > $info{'nopermission'} = 1; > C4::Context->_unset_userenv($sessionID); >+ if (C4::Context->preference('InsufficientPermissionRedirectURL')) { >+ print $query->redirect(C4::Context->preference('InsufficientPermissionRedirectURL')); >+ } > } > my ( $borrowernumber, $firstname, $surname, $userflags, > $branchcode, $branchname, $branchprinter, $emailaddress ); >diff --git a/installer/data/mysql/atomicupdate/bug_23920_-_new_syspref_InsufficientPermissionRedirectURL.sql b/installer/data/mysql/atomicupdate/bug_23920_-_new_syspref_InsufficientPermissionRedirectURL.sql >new file mode 100644 >index 0000000000..aded75ab25 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_23920_-_new_syspref_InsufficientPermissionRedirectURL.sql >@@ -0,0 +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'); >diff --git a/installer/data/mysql/bug_23920_-_new_syspref_InsufficientPermissionRedirectURL.sql b/installer/data/mysql/bug_23920_-_new_syspref_InsufficientPermissionRedirectURL.sql >new file mode 100644 >index 0000000000..aa0d9615de >--- /dev/null >+++ b/installer/data/mysql/bug_23920_-_new_syspref_InsufficientPermissionRedirectURL.sql >@@ -0,0 +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'); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index 9007da96a4..aa38abdc50 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -227,7 +227,9 @@ Patrons: > no: Allow all permitted users > - "to access/change superlibrarian privileges." > - "<br><strong>NOTE:</strong> A permitted user needs to have the 'permissions' flag (if no superlibrarian)." >- >+ - >+ - pref: InsufficientPermissionRedirectURL >+ - Enter a URL which Koha will re-direct to if a patron with insufficient permissions tries to login the staff client > Privacy: > - > - Use the following URL >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23930
:
94894