[Koha-bugs] [Bug 10258] New: Remove erroneous call to haspermission in basket.pl
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu May 16 11:58:33 CEST 2013
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10258
Bug ID: 10258
Summary: Remove erroneous call to haspermission in basket.pl
Classification: Unclassified
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: ASSIGNED
Severity: minor
Priority: P5 - low
Component: Acquisitions
Assignee: m.de.rooy at rijksmuseum.nl
Reporter: m.de.rooy at rijksmuseum.nl
Current code in basket.pl contains an invalid call of haspermission:
if ($basket->{closedate} && haspermission({ acquisition => 'group_manage'} ))
{
The first parameter should be userid, the second should be flagsrequired.
Looking at the code, it is useless to just insert the first parameter here via
$member->{userid}, since this would result in an empty basket group list.
To resolve this, more should be done in the template.
Currently, the erroneous call results in getting back some hash probably filled
with zeroes. But the hash makes the if test above prove true for a closed
basket. So in reality, any user will see here all basket groups. Removing this
erroneous call for haspermission will therefore not make a difference.
The proposed patch adds a FIXME.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list