Bugzilla – Attachment 65289 Details for
Bug 18902
Course Reserves still accessible by URL even if turned OFF
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18902: Disable access to CourseReserves if syspref off.
Bug-18902-Disable-access-to-CourseReserves-if-sysp.patch (text/plain), 3.35 KB, created by
Alex Buckley
on 2017-07-27 01:33:42 UTC
(
hide
)
Description:
Bug 18902: Disable access to CourseReserves if syspref off.
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-07-27 01:33:42 UTC
Size:
3.35 KB
patch
obsolete
>From b2f134341b87a02cf4566c82ad1b1c3b8c761b61 Mon Sep 17 00:00:00 2001 >From: Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com> >Date: Thu, 6 Jul 2017 17:35:41 +0200 >Subject: [PATCH] Bug 18902: Disable access to CourseReserves if syspref off. > >* course_reserves/course-reserves.pl: Add syspref check. >* course_reserves/mod_course.pl: Add syspref check. >* opac/opac-course-reserves.pl: Add syspref check. > >Test Plan: > >- Before applying this patch: > + Ensure UseCourseReserves is switched off > + visit OPAC: cgi-bin/koha/opac-course-reserves.pl > + visit Intranet: /cgi-bin/koha/course_reserves/course-reserves.pl > + visit Intranet: /cgi-bin/koha/course_reserves/mod_course.pl > + All will be accessible. > >- After applying this patch: > + Ensure UseCourseReserves is switched off > + visit OPAC: cgi-bin/koha/opac-course-reserves.pl > + visit Intranet: /cgi-bin/koha/course_reserves/course-reserves.pl > + visit Intranet: /cgi-bin/koha/course_reserves/mod_course.pl > + None will be accessible. > + Ensure UseCourseReserves is switched on > + visit OPAC: cgi-bin/koha/opac-course-reserves.pl > + visit Intranet: /cgi-bin/koha/course_reserves/course-reserves.pl > + visit Intranet: /cgi-bin/koha/course_reserves/mod_course.pl > + All will be accessible. > >Followed test plan, worked as intended >Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> >--- > course_reserves/course-reserves.pl | 6 ++++++ > course_reserves/mod_course.pl | 7 +++++++ > opac/opac-course-reserves.pl | 6 ++++++ > 3 files changed, 19 insertions(+) > >diff --git a/course_reserves/course-reserves.pl b/course_reserves/course-reserves.pl >index ca66696..5c203d7 100755 >--- a/course_reserves/course-reserves.pl >+++ b/course_reserves/course-reserves.pl >@@ -29,6 +29,12 @@ use C4::CourseReserves qw(GetCourses); > > my $cgi = new CGI; > >+unless (C4::Context->preference('UseCourseReserves')) { >+ # redirect to Intranet home if self-check is not enabled >+ print $cgi->redirect("/cgi-bin/koha/mainpage.pl"); >+ exit; >+} >+ > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { > template_name => "course_reserves/course-reserves.tt", >diff --git a/course_reserves/mod_course.pl b/course_reserves/mod_course.pl >index 844d157..ac0c839 100755 >--- a/course_reserves/mod_course.pl >+++ b/course_reserves/mod_course.pl >@@ -28,6 +28,13 @@ use C4::Auth; > use C4::CourseReserves qw(DelCourse ModCourse ModCourseInstructors); > > my $cgi = new CGI; >+ >+unless (C4::Context->preference('UseCourseReserves')) { >+ # redirect to Intranet home if self-check is not enabled >+ print $cgi->redirect("/cgi-bin/koha/mainpage.pl"); >+ exit; >+} >+ > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { template_name => "about.tt", > query => $cgi, >diff --git a/opac/opac-course-reserves.pl b/opac/opac-course-reserves.pl >index de1498b..51297a6 100755 >--- a/opac/opac-course-reserves.pl >+++ b/opac/opac-course-reserves.pl >@@ -29,6 +29,12 @@ use C4::CourseReserves qw(SearchCourses); > > my $cgi = new CGI; > >+unless (C4::Context->preference('UseCourseReserves')) { >+ # redirect to Intranet home if self-check is not enabled >+ print $cgi->redirect("/cgi-bin/koha/opac-main.pl"); >+ exit; >+} >+ > my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > { template_name => "opac-course-reserves.tt", > query => $cgi, >-- >2.1.4
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 18902
:
64853
|
64854
|
65289
|
65308