Bug 4289 - Add a syspref 'OpacPublic', to hide OPAC search-bar and force authentication on all OPAC pages
Summary: Add a syspref 'OpacPublic', to hide OPAC search-bar and force authentication ...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 3.4
Hardware: PC All
: PATCH-Sent (DO NOT USE) enhancement (vote)
Assignee: Owen Leonard
QA Contact: Bugs List
URL:
Keywords:
: 7564 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-02 10:59 UTC by Chris Cormack
Modified: 2012-10-25 23:09 UTC (History)
4 users (show)

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


Attachments
Patch for enhancement (20.47 KB, patch)
2010-03-02 12:17 UTC, Chris Cormack
Details | Diff | Splinter Review
screenshot (202.82 KB, image/png)
2010-03-02 12:25 UTC, Chris Cormack
Details
ammended patch, as requested (19.88 KB, patch)
2010-09-13 14:46 UTC, Mason James
Details | Diff | Splinter Review
new 'Opac'Public' patch (15.09 KB, patch)
2010-12-07 13:14 UTC, Mason James
Details | Diff | Splinter Review
oops, typo... (15.09 KB, patch)
2010-12-07 13:19 UTC, Mason James
Details | Diff | Splinter Review
corrected patch (15.09 KB, patch)
2010-12-07 13:24 UTC, Mason James
Details | Diff | Splinter Review
applied to master branch (14.89 KB, patch)
2010-12-08 16:07 UTC, Mason James
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 01:25:25 UTC


---- Reported by mason@kohaaloha.com 2010-03-02 10:59:13 ----

Here's the description from bob@calyx

"Most libraries are happy for the public to come to the OPAC and search the
catalogue without being logged in.  Others however (corporate libraries,
private colleges) require the user to be logged in before the collection or
any functionality is exposed.

Koha currently supports the first approach.  The second approach is
achievable by adding jquery to the template (won't stop hacking) or by
editing the perl code to set 'authnotrequired' value to '0' per page.
Neither way is user-friendly or produces an elegant display.

We propose adding a syspref 'OpacNotPublic' or similar which when set to
'OFF' will cause no change to current behaviour.  When set to 'ON' a
different template will be called by opacmain.pl that will display:
-	a login prompt similar to that for the staff client;
-	the value of opacsmallimage;
-	the value of opacheader;
-	the value of opaccredits.
Not displayed on this page will be:
-	the search bar and the cart and list buttons;
-	the value of opacnav;
-	the value of opacmainuserblock.

Upon logging in, the user is directed to 'opac-user.pl' as is the case now.

Before we lodge on Bugzilla, are there any comments?

Bob Birchall
CALYX
"



---- Additional Comments From mason@kohaaloha.com 2010-03-02 12:17:17 ----

Created an attachment
Patch for enhancement





---- Additional Comments From mason@kohaaloha.com 2010-03-02 12:25:42 ----

Created an attachment
screenshot

a screenshot with the 'OpacNotPublic' syspref ON.  

OPAC search-bar and buttons are hidden, and user authentication is now forced for all OPAC pages.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:25 UTC  ---

This bug was previously known as _bug_ 4289 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4289
Imported an attachment (id=1982)
Imported an attachment (id=1983)

Actual time not defined. Setting to 0.0
The original reporter of this bug does not have
   an account here. Reassigning to the person who moved
   it here: chris@bigballofwax.co.nz.
   Previous reporter was mason@kohaaloha.com.
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.
The original submitter of attachment 1982 [details] [review] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.
The original submitter of attachment 1983 [details] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.

Comment 1 Jared Camins 2010-09-09 15:24:41 UTC
Could you please resend this patch? I am happy to sign off on it, per the new patching rules, but the patch attached to the bug does not have your commit message, so I cannot do that.

Thanks.
Jared
Comment 2 Mason James 2010-09-13 14:46:12 UTC Comment hidden (obsolete)
Comment 3 Mason James 2010-12-07 13:01:33 UTC
UPDATE: Paul.P suggested on the koha list that this sys-pref be changed to 'OpacPublic', to avoid a silly double-negative

i've rewritten this feature based on Paul's suggestion.

new patch attached
Comment 4 Mason James 2010-12-07 13:14:52 UTC Comment hidden (obsolete)
Comment 5 Mason James 2010-12-07 13:19:19 UTC Comment hidden (obsolete)
Comment 6 Mason James 2010-12-07 13:24:22 UTC Comment hidden (obsolete)
Comment 7 Mason James 2010-12-08 16:07:17 UTC
Created attachment 2819 [details] [review]
applied to master branch

applied againist master, commit e54169ba0f06cd835d72936e14012933a67793e7
Comment 8 Nicole C. Engard 2010-12-16 21:01:38 UTC
Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all y
Applying Bug 4289: 'OpacPublic' feature
error: patch failed: installer/data/mysql/updatedatabase.pl:3876
error: installer/data/mysql/updatedatabase.pl: patch does not apply
error: patch failed: opac/opac-showreviews.pl:34
error: opac/opac-showreviews.pl: patch does not apply
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merged C4/Auth.pm
Auto-merged installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Auto-merged koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc
Auto-merged opac/opac-detail.pl
Auto-merged opac/opac-search.pl
Auto-merged opac/opac-showreviews.pl
Auto-merged opac/opac-suggestions.pl
Auto-merged opac/opac-userupdate.pl
Failed to merge in the changes.
Patch failed at 0001.
When you have resolved this problem run "git-am -i -3 --resolved".
If you would prefer to skip this patch, instead run "git-am -i -3 --skip".
nengard@debian:~/kohaclone$
Comment 10 Chris Cormack 2011-01-19 01:34:46 UTC
Pushed, and merged to master, please test

Note: Chris N ... not for 3.2.x
Comment 11 Chris Cormack 2011-01-23 18:17:55 UTC
Follow up patch pushed
Comment 12 MJ Ray (software.coop) 2011-02-05 19:00:52 UTC
This bug is mentioned in:
Bug 4289 Add a syspref 'OpacPublic', http://lists.koha-community.org/pipermail/koha-patches/2011-January/013629.html
Bug 4289: OpacPublic prevents login into OPAC http://lists.koha-community.org/pipermail/koha-patches/2011-January/013692.html
Comment 13 Chris Cormack 2012-02-21 05:31:04 UTC
*** Bug 7564 has been marked as a duplicate of this bug. ***