Summary: | Records hidden with OpacSuppression can still be accessed | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | OPAC | Assignee: | Mirko Tietgen <mirko> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | dcook, gmcharlt, mirko, mtj, sophie.meynieux |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 28478, 27685 | ||
Attachments: |
Bug 10195 Records hidden with OpacSuppression can still be accessed
Bug 10195 Records hidden with OpacSuppression can still be accessed Bug 10195 Records hidden with OpacSuppression can still be accessed [SIGNED-OFF] Bug 10195 Records hidden with OpacSuppression can still be accessed Bug 10195 Records hidden with OpacSuppression can still be accessed |
Description
Katrin Fischer
2013-05-05 13:37:02 UTC
Created attachment 19691 [details] [review] Bug 10195 Records hidden with OpacSuppression can still be accessed Initial commit Created attachment 19693 [details] [review] Bug 10195 Records hidden with OpacSuppression can still be accessed Records hidden with OpacSuppression are filtered from the search results, but the opac-detail page is still visible if you know the biblio number. This patch hides the detail page for suppressed biblios by redirecting (controlled by the syspref OpacSuppressionRedirect) either to opac-blocked (default), explaining that the record is blocked (including optional explanatory text from the syspref OpacSuppressionMessage) or to Koha's 404 page, giving no hint that a biblio with that number exists in the system. Created attachment 19697 [details] [review] Bug 10195 Records hidden with OpacSuppression can still be accessed Records hidden with OpacSuppression are filtered from the search results, but the opac-detail page is still visible if you know the biblio number. This patch hides the detail page for suppressed biblios by redirecting (controlled by the syspref OpacSuppressionRedirect) either to opac-blocked (default), explaining that the record is blocked (including optional explanatory text from the syspref OpacSuppressionMessage) or to Koha's 404 page, giving no hint that a biblio with that number exists in the system. Test plan: Make sure you have at least one record with 942$n == 1. Set OpacSuppression to "Don't hide". Do an OPAC search that should bring up your hidden record and other records. Observe that your record is found. Open the detail page for the record. Observe that it is accessible. Copy the URL for later(!). Set OpacSuppression to "Hide". Leave OpacSuppressionByIPRange blank. Set OpacSuppressionRedirect to "an explanatory page ('This record is blocked')." Leave OpacSuppressionMessage blank for now. Disable queryparser(!) (because of bug 10542). Do a full zebra reindex. Do an OPAC search that should bring up your hidden record and other records. Observe that your record is not found. Open the opac-detail URL of the record (the one you copied before). Observe that you are redirected to opac-blocked and it displays a short standard message. Edit OpacSuppressionMessage and input some text. Open the opac-detail URL of the record again (the one you copied before). Observe that the text you entered in OpacSuppressionMessage is displayed under the standard text you have seen before. Set OpacSuppressionRedirect to "the 404 error page ('Not found')." Open the opac-detail URL of the record again (the one you copied before). Observe that you are redirected to Koha's 404 error page. Sign off the patch. :) Created attachment 19873 [details] [review] [SIGNED-OFF] Bug 10195 Records hidden with OpacSuppression can still be accessed Records hidden with OpacSuppression are filtered from the search results, but the opac-detail page is still visible if you know the biblio number. This patch hides the detail page for suppressed biblios by redirecting (controlled by the syspref OpacSuppressionRedirect) either to opac-blocked (default), explaining that the record is blocked (including optional explanatory text from the syspref OpacSuppressionMessage) or to Koha's 404 page, giving no hint that a biblio with that number exists in the system. Test plan: Make sure you have at least one record with 942$n == 1. Set OpacSuppression to "Don't hide". Do an OPAC search that should bring up your hidden record and other records. Observe that your record is found. Open the detail page for the record. Observe that it is accessible. Copy the URL for later(!). Set OpacSuppression to "Hide". Leave OpacSuppressionByIPRange blank. Set OpacSuppressionRedirect to "an explanatory page ('This record is blocked')." Leave OpacSuppressionMessage blank for now. Disable queryparser(!) (because of bug 10542). Do a full zebra reindex. Do an OPAC search that should bring up your hidden record and other records. Observe that your record is not found. Open the opac-detail URL of the record (the one you copied before). Observe that you are redirected to opac-blocked and it displays a short standard message. Edit OpacSuppressionMessage and input some text. Open the opac-detail URL of the record again (the one you copied before). Observe that the text you entered in OpacSuppressionMessage is displayed under the standard text you have seen before. Set OpacSuppressionRedirect to "the 404 error page ('Not found')." Open the opac-detail URL of the record again (the one you copied before). Observe that you are redirected to Koha's 404 error page. Sign off the patch. :) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 20428 [details] [review] Bug 10195 Records hidden with OpacSuppression can still be accessed Records hidden with OpacSuppression are filtered from the search results, but the opac-detail page is still visible if you know the biblio number. This patch hides the detail page for suppressed biblios by redirecting (controlled by the syspref OpacSuppressionRedirect) either to opac-blocked (default), explaining that the record is blocked (including optional explanatory text from the syspref OpacSuppressionMessage) or to Koha's 404 page, giving no hint that a biblio with that number exists in the system. Test plan: Make sure you have at least one record with 942$n == 1. Set OpacSuppression to "Don't hide". Do an OPAC search that should bring up your hidden record and other records. Observe that your record is found. Open the detail page for the record. Observe that it is accessible. Copy the URL for later(!). Set OpacSuppression to "Hide". Leave OpacSuppressionByIPRange blank. Set OpacSuppressionRedirect to "an explanatory page ('This record is blocked')." Leave OpacSuppressionMessage blank for now. Disable queryparser(!) (because of bug 10542). Do a full zebra reindex. Do an OPAC search that should bring up your hidden record and other records. Observe that your record is not found. Open the opac-detail URL of the record (the one you copied before). Observe that you are redirected to opac-blocked and it displays a short standard message. Edit OpacSuppressionMessage and input some text. Open the opac-detail URL of the record again (the one you copied before). Observe that the text you entered in OpacSuppressionMessage is displayed under the standard text you have seen before. Set OpacSuppressionRedirect to "the 404 error page ('Not found')." Open the opac-detail URL of the record again (the one you copied before). Observe that you are redirected to Koha's 404 error page. Sign off the patch. :) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Passes koha-qa.pl, works as advertised. Pushed to master. Thanks, Mirko! This patch could be seen as a regression for some libraries. I know one of them which doesn't want to show 'hidden' biblio records on result page, but want to propose to users direct links to some of those records from their intranet web site: something like a 'confidential' bibliography. I think the best solution would be to add a third option then? The field used for OpacSuppression should be set in a syspref : 942$n is used in marc21 but not in Unimarc (In reply to Sophie MEYNIEUX from comment #9) > The field used for OpacSuppression should be set in a syspref : 942$n is > used in marc21 but not in Unimarc Could we hardcode a field for UNIMARC? You also need an index with a specific name for it to work - would be good to have a default. Or have harcoded values and a pref if they don't apply, with a warning that you have to take care of indexing? Anyway, we will need a new bug! :) (In reply to Katrin Fischer from comment #10) > (In reply to Sophie MEYNIEUX from comment #9) > > The field used for OpacSuppression should be set in a syspref : 942$n is > > used in marc21 but not in Unimarc > > Could we hardcode a field for UNIMARC? You also need an index with a > specific name for it to work - would be good to have a default. Or have > harcoded values and a pref if they don't apply, with a warning that you have > to take care of indexing? > > Anyway, we will need a new bug! :) I'm thinking it's worthwhile having a database field for OpacSuppression, and then people can map the relevant MARC field using /cgi-bin/koha/admin/koha2marclinks.pl (In reply to David Cook from comment #11) > (In reply to Katrin Fischer from comment #10) > > (In reply to Sophie MEYNIEUX from comment #9) > > > The field used for OpacSuppression should be set in a syspref : 942$n is > > > used in marc21 but not in Unimarc > > > > Could we hardcode a field for UNIMARC? You also need an index with a > > specific name for it to work - would be good to have a default. Or have > > harcoded values and a pref if they don't apply, with a warning that you have > > to take care of indexing? > > > > Anyway, we will need a new bug! :) > > I'm thinking it's worthwhile having a database field for OpacSuppression, > and then people can map the relevant MARC field using > /cgi-bin/koha/admin/koha2marclinks.pl It would be cleaner by fitting in better with existing patterns, but it wouldn't solve the problem that you'd need an index defined. Having a pre-defined index for UNIMARC could help people being able the feature in Koha out of the box. Btw. this bug has been fixed ages ago. |