Bug 6322 - It's possible to view lists/virtualshelves even when virtualshelves is off
Summary: It's possible to view lists/virtualshelves even when virtualshelves is off
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Lists (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-08 20:24 UTC by Magnus Enger
Modified: 2017-06-14 22:07 UTC (History)
8 users (show)

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


Attachments
Bug 6322 - It's possible to view lists/virtualshelves even when virtualshelves is off (2.01 KB, patch)
2014-04-23 17:09 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 6322 - It's possible to view lists/virtualshelves even when virtualshelves is off (3.90 KB, patch)
2014-07-10 14:36 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 6322 - It's possible to view lists/virtualshelves even when virtualshelves is off (4.04 KB, patch)
2016-01-12 22:28 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 6322 - It's possible to view lists/virtualshelves even when virtualshelves is off (3.99 KB, patch)
2016-01-15 17:21 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2011-05-08 20:24:05 UTC
In current head, setting the virtualshelves syspref to off removes the Lists "button" from the OPAC, but if you visit the URL of a list, you can still view it's contents. I would have expected to get a message like "this feature is currently turned off" or similar.
Comment 1 Owen Leonard 2013-03-26 15:07:19 UTC
This bug is still valid in master as of 3.12 beta1.
Comment 2 Owen Leonard 2014-04-23 17:09:10 UTC Comment hidden (obsolete)
Comment 3 David Cook 2014-04-24 00:40:23 UTC
I quite like this idea (and this patch works well), but it should probably also include the following pages:

opac-downloadshelf.pl
opac-sendshelf.pl
opac-addbybiblionumber.pl

There might be others, but those are the ones that I've noticed.
Comment 4 David Cook 2014-04-24 00:41:04 UTC
Just marking this as failed, as it's not quite inclusive enough yet.
Comment 5 Owen Leonard 2014-07-10 14:36:05 UTC Comment hidden (obsolete)
Comment 6 Aleisha Amohia 2014-07-15 00:37:48 UTC
I wasn't able to recreate the bug as all pages mentioned redirected to Error 404 pages with the virtualshelves syspref set to 'Don't allow' (as it should) but also when set to 'Allow' (as it shouldn't). However I don't think the patch was breaking anything. Setting to Failed QA because I was unable to recreate the bug and test the patch.
Comment 7 Aleisha Amohia 2016-01-12 22:28:51 UTC Comment hidden (obsolete)
Comment 8 Aleisha Amohia 2016-01-12 22:29:50 UTC
There was a merge conflict in opac-addbybiblionumber.pl but I think I fixed it. Not sure what went wrong the first time I tested this but seems fine to sign off now :)
Comment 9 Jonathan Druart 2016-01-13 10:04:35 UTC
Comment on attachment 46563 [details] [review]
Bug 6322 - It's possible to view lists/virtualshelves even when virtualshelves is off

Review of attachment 46563 [details] [review]:
-----------------------------------------------------------------

::: opac/opac-addbybiblionumber.pl
@@ -41,5 @@
>  our @biblios;
>  
> -
> -if (scalar(@biblionumber) == 1) {
> -    @biblionumber = (split /\//,$biblionumber[0]);

No it has not been fixed correctly, these lines should be kept.
Comment 10 Jonathan Druart 2016-01-13 10:07:47 UTC
Owen,
Don't you think we should apply the same fix for the staff interface?
Comment 11 Kyle M Hall 2016-01-15 17:21:35 UTC
Created attachment 46715 [details] [review]
Bug 6322 - It's possible to view lists/virtualshelves even when virtualshelves is off

If the user knows the URL for OPAC lists they can access them even with
the virtualshelves preference turned off. This patch copies the solution
added to opac-topissues.pl by Bug 10595 and applies it to OPAC lists
pages.

To test, apply the patch and set the virtualshelves system preference to
"don't allow."

- Navigate to /cgi-bin/koha/opac-shelves.pl. You should be redirected to
  an Error 404 page.
- Also check:
  - /cgi-bin/koha/opac-shareshelf.pl.
  - /cgi-bin/koha/opac-downloadshelf.pl
  - /cgi-bin/koha/opac-sendshelf.pl
  - /cgi-bin/koha/opac-addbybiblionumber.pl
- Turn virtualshelves back on. Access to lists and list sharing should
  be restored.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 12 Kyle M Hall 2016-01-15 17:22:21 UTC
Aleisha, I'm not sure if you meant to set this to signed off or not. If you did not sign off on this, just set the status to signed-off and I can be the signer.
Comment 13 Aleisha Amohia 2016-01-15 18:49:04 UTC
(In reply to Kyle M Hall from comment #12)
> Aleisha, I'm not sure if you meant to set this to signed off or not. If you
> did not sign off on this, just set the status to signed-off and I can be the
> signer.

Sorry, yes I was meant to sign off. Not sure why it didn't work
Comment 14 Kyle M Hall 2016-01-15 19:53:46 UTC
(In reply to Aleisha Amohia from comment #13)
> (In reply to Kyle M Hall from comment #12)
> > Aleisha, I'm not sure if you meant to set this to signed off or not. If you
> > did not sign off on this, just set the status to signed-off and I can be the
> > signer.
> 
> Sorry, yes I was meant to sign off. Not sure why it didn't work

Np! I already added your sign-off to the patch, assuming that was the case.
Comment 15 Brendan Gallagher 2016-01-27 02:33:07 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!
Comment 16 Julian Maurice 2016-02-04 21:23:22 UTC
Patch pushed to 3.22.x, will be in 3.22.3
Comment 17 Frédéric Demians 2016-02-20 08:53:02 UTC
This patch has been pushed to 3.20.x, will be in 3.20.9.