Bug 15386 - Checkout / patron pages: Hide menu items leading to 404 page
Summary: Checkout / patron pages: Hide menu items leading to 404 page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-16 14:59 UTC by Marc Véron
Modified: 2017-06-14 22:11 UTC (History)
4 users (show)

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


Attachments
Bug 15386: Checkout / patron pages: Hide menu items leading to 404 pages (6.39 KB, patch)
2015-12-16 15:16 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15386: Checkout / patron pages: Hide menu items leading to 404 pages (5.91 KB, patch)
2015-12-26 12:30 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2015-12-16 14:59:50 UTC
Some of the menu items on patron / Checkout related pages lead to a 404 page depending on the permissions. 

To reproduce: 
- For a staff member A, set permission 'borrowers' only (+ 'catalogue')
- Log in as A
- Search a patron and display details
- Click menu items at the left, some of them lead to the 404 page
  (e.g. 'Details')

- 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
Comment 1 Marc Véron 2015-12-16 15:16:23 UTC Comment hidden (obsolete)
Comment 2 Lucio Moraes 2015-12-23 23:26:33 UTC
Looks like ok
Comment 3 Lucio Moraes 2015-12-23 23:45:10 UTC
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 expecte

Signed-off-by: Lucio Moraes <lmoraes@catalyst.net.nz>
Comment 4 Jonathan Druart 2015-12-26 12:30:21 UTC
Created attachment 45987 [details] [review]
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')
Comment 5 Kyle M Hall 2015-12-30 14:01:38 UTC
Pushed to master, thanks Marc!
Comment 6 Julian Maurice 2015-12-31 09:45:51 UTC
Patch pushed to 3.22.x, will be in 3.22.2