Bug 18756: Users can view aq.baskets even if they are not allowed
authorChristophe Croullebois <christophe.croullebois@biblibre.com>
Thu, 8 Jun 2017 13:17:56 +0000 (13:17 +0000)
committerKatrin Fischer <katrin.fischer.83@web.de>
Sat, 15 Jul 2017 17:58:03 +0000 (19:58 +0200)
commit885886fe2e414eff3fb7ee812f69b811938e1f06
treeff3e64b4bef0729b7ac5980ac586d7fb8adb81b8
parent794061a947f3275ac82e6fc0a168ae44a0af6b28
Bug 18756: Users can view aq.baskets even if they are not allowed

Due to bad use of grep syntax if there is one or more Basket Users the result of grep is not equal to 0 and the borrower is allowed.

Test plan :
1- select system preference 'AcqViewBaskets' on 'user'
2- create 2 borrowers (A, B) with only permissions on acquisition :
group_manage
order_manage
order_receive
staff
3- login with A and create a basket
4- add a basquet manager other than B
5- relog with account B
6- you can see the basket

Apply the patch.
The basket is no longer visible.
1- relog with A
2- add basquet manager B
3- relog with B
5- you must see the basket

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0c09adbfc87b950b9f08aebede131ba694997290)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9800895cabade7ad8d78ff986a9a156f3962efa2)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
C4/Acquisition.pm