Bug 28727 - "Edit item" button on moredetail should be enabled with edit_items permission
Summary: "Edit item" button on moredetail should be enabled with edit_items permission
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Andrew Fuerste-Henry
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-20 19:31 UTC by Andrew Fuerste-Henry
Modified: 2021-08-16 21:07 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.03,20.11.09


Attachments
Bug 28727: Show edit item link when user has edit items permission (1.60 KB, patch)
2021-07-20 19:44 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 28727: Show edit item link when user has edit items permission (1.65 KB, patch)
2021-07-27 12:06 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28727: Show edit item link when user has edit items permission (1.71 KB, patch)
2021-08-10 23:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28727: (QA follow-up) Simplify permission check (1.80 KB, patch)
2021-08-10 23:07 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2021-07-20 19:31:55 UTC
To recreate:
- have a patron with edit_items permission but not edit_catalogue
- log in as that patron
- find a bib record with at least one item, click the to Items tab
- Notice there is not am "Edit item" button under each barcode
- Click back to the Normal tab, confirm you can successfully edit the item via the other Edit buttons
- go back to your patron record, give yourself edit_catalogue permission
- go back to your bib, to the items tab, confirm the edit link appears
Comment 1 Andrew Fuerste-Henry 2021-07-20 19:44:58 UTC
Created attachment 122992 [details] [review]
Bug 28727: Show edit item link when user has edit items permission

To test:
1: log in as a user with edit_items but not edit_catalogue
2: confirm you do not get an Edit Item link on moredetail.pl
3: apply patch, restart, reload
4: confirm link now shows
Comment 2 Owen Leonard 2021-07-27 12:06:42 UTC
Created attachment 123209 [details] [review]
Bug 28727: Show edit item link when user has edit items permission

To test:
1: log in as a user with edit_items but not edit_catalogue
2: confirm you do not get an Edit Item link on moredetail.pl
3: apply patch, restart, reload
4: confirm link now shows

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Katrin Fischer 2021-08-10 23:07:21 UTC
Created attachment 123726 [details] [review]
Bug 28727: Show edit item link when user has edit items permission

To test:
1: log in as a user with edit_items but not edit_catalogue
2: confirm you do not get an Edit Item link on moredetail.pl
3: apply patch, restart, reload
4: confirm link now shows

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2021-08-10 23:07:25 UTC
Created attachment 123727 [details] [review]
Bug 28727: (QA follow-up) Simplify permission check

There was another permission check for edit_items directly below,
so instead of changing them to both be edit_items, I think we
can now remove one.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2021-08-11 11:24:00 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 6 Kyle M Hall 2021-08-13 11:31:46 UTC
Pushed to 21.05.x for 21.05.03
Comment 7 Fridolin Somers 2021-08-13 20:08:53 UTC
Another funny behavior.
With only edit_items you have access and links to "Cataloguing" home page, but its empty.
It is for another bug report.
Comment 8 Fridolin Somers 2021-08-13 20:09:23 UTC
Pushed to 20.11.x for 20.11.09
Comment 9 Victor Grousset/tuxayo 2021-08-16 21:07:53 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.