Bug 38128 - Agreement/license user selection not limited to users with ERM module permissions
Summary: Agreement/license user selection not limited to users with ERM module permiss...
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on: 35329
Blocks:
  Show dependency treegraph
 
Reported: 2024-10-08 19:01 UTC by Caroline Cyr La Rose
Modified: 2024-11-07 11:04 UTC (History)
6 users (show)

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


Attachments
Bug 38128: (Bug 35329 follow-up) Filter ERM users to users with erm permission (1.50 KB, patch)
2024-10-09 07:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38128: (Bug 35329 follow-up) Filter ERM users to users with erm permission (1.55 KB, patch)
2024-10-09 08:00 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38128: (Bug 35329 follow-up) Filter ERM users to users with erm permission (1.62 KB, patch)
2024-10-28 11:02 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38128: Fix cypress test (886 bytes, patch)
2024-11-07 10:59 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 Caroline Cyr La Rose 2024-10-08 19:01:18 UTC
The manual says that the user selection in ERM agreements and licences are limited to patrons with erm permissions. This is no longer true. I don't know if it is intentional, or a simple omission (possibly from Bug 35329). It made sense to limit the patron search this way, I think.

To get there:
1. Enable ERMModule
2. Go to E-resource management > Agreement > New agreement
3. Click 'Add new user'
4. Click 'Select user'
5. Search for alford (for example)
   --> Jordan Alford is in the results, even if they don't have erm permissions
6. Go to Licences > New licence
7. Repeat steps 3-5
   --> Jordan Alford is in the results, even if they don't have erm permissions

I tried on a local 23.05 installation and Jordan Alford is not in the results, because they don't have erm permissions.
Comment 1 Jonathan Druart 2024-10-09 07:33:18 UTC
Created attachment 172556 [details] [review]
Bug 38128: (Bug 35329 follow-up) Filter ERM users to users with erm permission

There was a silly mistake, we passed the TT var erm_users instead of the
string "erm_users".
It should also be passed to patron_search_modal to display the note.

Test plan:
Confirm that with this patch a patron search in the ERM module returns
only patrons with the erm permission.
Comment 2 Pedro Amorim 2024-10-09 08:00:24 UTC
Created attachment 172558 [details] [review]
Bug 38128: (Bug 35329 follow-up) Filter ERM users to users with erm permission

There was a silly mistake, we passed the TT var erm_users instead of the
string "erm_users".
It should also be passed to patron_search_modal to display the note.

Test plan:
Confirm that with this patch a patron search in the ERM module returns
only patrons with the erm permission.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 3 Pedro Amorim 2024-10-22 11:55:22 UTC
@Caroline are you able to test this, as the original reporter of the bug? If you're able to add your SO, we can change mine to PQA to help this move in the queue.
Comment 4 Martin Renvoize (ashimema) 2024-10-28 11:02:08 UTC
Created attachment 173510 [details] [review]
Bug 38128: (Bug 35329 follow-up) Filter ERM users to users with erm permission

There was a silly mistake, we passed the TT var erm_users instead of the
string "erm_users".
It should also be passed to patron_search_modal to display the note.

Test plan:
Confirm that with this patch a patron search in the ERM module returns
only patrons with the erm permission.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Katrin Fischer 2024-10-29 07:54:31 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 6 Jonathan Druart 2024-11-07 10:59:24 UTC
Created attachment 174111 [details] [review]
Bug 38128: Fix cypress test

We were mocking the wrong route.
Comment 7 Katrin Fischer 2024-11-07 11:04:19 UTC
(In reply to Jonathan Druart from comment #6)
> Created attachment 174111 [details] [review] [review]
> Bug 38128: Fix cypress test
> 
> We were mocking the wrong route.

Thanks, picked follow-up for main.