[Koha-bugs] [Bug 31333] Add the ability to limit purchase suggestions by patron category

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Aug 29 05:32:23 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31333

Alex Buckley <alexbuckley at catalyst.net.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |Needs Signoff

--- Comment #27 from Alex Buckley <alexbuckley at catalyst.net.nz> ---
(In reply to Katrin Fischer from comment #22)
> Hi Alex,
> 
> I provided 2 follow-ups, but then I got stuck: The new check doesn't take 
> AnonSuggestions into account. When you click on the link in OPAC navigation
> now, you get a 404 if logged in and Can't call method "category" on an
> undefined value at /kohadevbox/koha/opac/opac-suggestions.pl line 97 if you
> are logged out.
> 
> I believe if AnonSuggestions is set, we need to always allow suggestions
> independent of the other settings (should not matter if logged in or logged
> out).

Hi Katrin, 

I have attached a follow-up patch that should, hopefully, resolve the problems
you raised.

Now regardless of any other setting if the AnonSuggestions & suggestion syspref
is enabled then a patron can create an OPAC suggestion. 

I tested on master and found if you have AnonSuggestions enabled, but
suggestion disabled, then opac-suggestions.pl re-directs to the 404 page.

You'll notice I also tweaked C4::Auth->get_template_and_user() so it now checks
whether AnonSuggestions is enabled before passing the suggestion variable to
the template.
As I've added that I have tweaked your check on opac-results.tt, I hope that is
alright. 

Ready for testing again.

Alex

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list