Bug 15386: Checkout / patron pages: Hide menu items leading to 404 pages
authorMarc Véron <veron@veron.ch>
Wed, 16 Dec 2015 15:00:15 +0000 (16:00 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Wed, 30 Dec 2015 13:10:10 +0000 (13:10 +0000)
commit976d715ac52a3c54cbc397d22127e773f977e0db
tree71b95ab537087e55262d280f370a30c4f5026140
parentf0da781368a187337236d64ee94d9c8cc65f90f7
Bug 15386: Checkout / patron pages: Hide menu items leading to 404 pages

Some of the menu items on patron / Checkout related pages lead to a 404 page
depending on the permissions. This patch hides them as appropriate.

To test:

- For a staff member A, set permission 'borrowers' only (+ 'catalogue')
- Log in as A
- Search a patron and display details
- Verify that none of the menu items at the left lead to the 404 page

- For a staff member B, set permission 'circulate_remaining_permission'
  only (+ catalogue)
- Log in as B
- Go to Circulation > Checkout, search a patron
- Click menu items at the left, some of them lead to the 404 page
- Verify that none of the menu items at the left lead to the 404 page

- Do the same for a staff member C with both permissions set
- Verify that menu items appear as expected

Signed-off-by: Lucio Moraes <lmoraes@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: I have remove the double if
CAN_user_circulate_circulate_remaining_permissions statement (and group
block into one). And also remove unecessary change ('IF a IF b' instead
of existing 'IF a && b')

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc