Bug 18902

Summary: Course Reserves still accessible by URL even if turned OFF
Product: Koha Reporter: Alex Sassmannshausen <alex>
Component: CirculationAssignee: Alex Sassmannshausen <alex>
Status: In Discussion --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: elizabethjohn6654, gmcharlt, jonathan.druart, kyle.m.hall, m.de.rooy
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 18902: Disable access to CourseReserves if syspref off.
Bug 18902: Disable access to CourseReserves if syspref off.
Bug 18902: Disable access to CourseReserves if syspref off.
Bug 18902: Disable access to CourseReserves if syspref off.

Description Alex Sassmannshausen 2017-07-06 15:30:00 UTC
You can access the course reserves functionality at https://kas-staff.koha-ptfs.co.uk/cgi-bin/koha/course_reserves/course-reserves.pl even if the syspref is turned off.

A patch should implement redirection from that page when the syspref is off.

Alex
Comment 1 Alex Sassmannshausen 2017-07-06 15:41:22 UTC
Created attachment 64853 [details] [review]
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.
Comment 2 Alex Sassmannshausen 2017-07-06 15:44:54 UTC
Created attachment 64854 [details] [review]
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.
Comment 3 Alex Buckley 2017-07-27 01:33:42 UTC
Created attachment 65289 [details] [review]
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>
Comment 4 Jonathan Druart 2017-07-27 13:39:29 UTC
It sounds like it would be better to display a message on the staff interface, but not that easy.
However do not you think that we need to modify all course_reserves/* scripts?
The module may have been enabled then disabled later.
Comment 5 Marcel de Rooy 2017-07-28 10:13:22 UTC
Created attachment 65308 [details] [review]
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>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Jonathan Druart 2017-07-28 14:35:40 UTC
(In reply to Jonathan Druart from comment #4)
> It sounds like it would be better to display a message on the staff
> interface, but not that easy.
> However do not you think that we need to modify all course_reserves/*
> scripts?
> The module may have been enabled then disabled later.

This needs an answer
Comment 7 Marcel de Rooy 2017-07-28 15:30:37 UTC
(In reply to Jonathan Druart from comment #6)
> (In reply to Jonathan Druart from comment #4)
> > It sounds like it would be better to display a message on the staff
> > interface, but not that easy.
> > However do not you think that we need to modify all course_reserves/*
> > scripts?
> > The module may have been enabled then disabled later.
> 
> This needs an answer

Overlooked your comment.
Comment 9 Jonathan Druart 2022-08-11 09:50:02 UTC
(In reply to Elizabeth John from comment #8)

Spam