Bug 18902 - Course Reserves still accessible by URL even if turned OFF
Summary: Course Reserves still accessible by URL even if turned OFF
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Alex Sassmannshausen
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-06 15:30 UTC by Alex Sassmannshausen
Modified: 2022-08-11 09:50 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 18902: Disable access to CourseReserves if syspref off. (2.42 KB, patch)
2017-07-06 15:41 UTC, Alex Sassmannshausen
Details | Diff | Splinter Review
Bug 18902: Disable access to CourseReserves if syspref off. (3.27 KB, patch)
2017-07-06 15:44 UTC, Alex Sassmannshausen
Details | Diff | Splinter Review
Bug 18902: Disable access to CourseReserves if syspref off. (3.35 KB, patch)
2017-07-27 01:33 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 18902: Disable access to CourseReserves if syspref off. (3.44 KB, patch)
2017-07-28 10:13 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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