Bug 33363 - More specific permissions for purchase suggestions
Summary: More specific permissions for purchase suggestions
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement with 10 votes (vote)
Assignee: Kyle M Hall
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-29 19:25 UTC by Donna
Modified: 2024-01-12 09:34 UTC (History)
13 users (show)

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


Attachments
Bug 33363: Add separate permissions for creating and deleting suggestions (47.77 KB, patch)
2023-04-26 15:26 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 33363: Add separate permissions for creating and deleting suggestions (47.77 KB, patch)
2023-05-01 10:21 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33363: Add separate permissions for creating and deleting suggestions (47.98 KB, patch)
2023-07-07 12:56 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 33363: Add separate permissions for creating and deleting suggestions (48.75 KB, patch)
2024-01-11 13:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 33363: Add unit tests (3.31 KB, patch)
2024-01-11 13:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 33363: Add separate permissions for creating and deleting suggestions (49.00 KB, patch)
2024-01-12 09:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 33363: Add unit tests (3.35 KB, patch)
2024-01-12 09:33 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Donna 2023-03-29 19:25:36 UTC
There are a number of libraries that would like for their staff to be able to submit (and view existing) purchase suggestions from the borrower record, but not give the staff the ability to edit/manage/delete purchase suggestions.  

Currently if staff are given Suggestions Management/Manage Purchase Suggestions, and no Acq permissions, they are able to not only submit/view from the borrower record, but also access the purchase suggestion module and update/approve/delete purchase suggestions.  If Suggestions Management is not turned on, then staff cannot enter a purchase suggestion from a borrower record, nor can they see them from the patron record to let the patron know what the status is.

It would be helpful to have an addition permission level that would allow staff to enter a purchase suggestion from the borrower record, and view the existing purchase suggestions on a patron account.
Comment 1 Kristi 2023-04-03 21:08:00 UTC
Thank you for submitting a bug report for this, Donna!
Comment 2 Kyle M Hall 2023-04-26 15:26:19 UTC
Created attachment 150247 [details] [review]
Bug 33363: Add separate permissions for creating and deleting suggestions

There are a number of libraries that would like for their staff to be able to submit (and view existing) purchase suggestions from the borrower record, but not give the staff the ability to edit/manage/delete purchase suggestions.

Test Plan:
1) Apply this patch
2) Run restart all the things!
3) Run updatedatabase
4) Verify anyone with the suggestions manage permissions now has the create and delete permissions as well
5) Verify anyone without the suggestions manage permission has not recieved the new permissions
6) Enable only the create permission for a librarian
7) Verify that librarian can only create new suggestions ( not manage or delete )
8) Enable only the manage permission for a librarian
9) Verify that librarian can only manage existing suggestions ( not create or delete )
10) Enable only the delete permission for a librarian
11) Verify that librarian can only delete suggestions ( not create or manage )
Comment 3 PTFS Europe Sandboxes 2023-05-01 10:21:05 UTC
Created attachment 150450 [details] [review]
Bug 33363: Add separate permissions for creating and deleting suggestions

There are a number of libraries that would like for their staff to be able to submit (and view existing) purchase suggestions from the borrower record, but not give the staff the ability to edit/manage/delete purchase suggestions.

Test Plan:
1) Apply this patch
2) Run restart all the things!
3) Run updatedatabase
4) Verify anyone with the suggestions manage permissions now has the create and delete permissions as well
5) Verify anyone without the suggestions manage permission has not recieved the new permissions
6) Enable only the create permission for a librarian
7) Verify that librarian can only create new suggestions ( not manage or delete )
8) Enable only the manage permission for a librarian
9) Verify that librarian can only manage existing suggestions ( not create or delete )
10) Enable only the delete permission for a librarian
11) Verify that librarian can only delete suggestions ( not create or manage )

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Comment 4 Kyle M Hall 2023-07-07 12:56:34 UTC
Created attachment 153177 [details] [review]
Bug 33363: Add separate permissions for creating and deleting suggestions

There are a number of libraries that would like for their staff to be able to submit (and view existing) purchase suggestions from the borrower record, but not give the staff the ability to edit/manage/delete purchase suggestions.

Test Plan:
1) Apply this patch
2) Run restart all the things!
3) Run updatedatabase
4) Verify anyone with the suggestions manage permissions now has the create and delete permissions as well
5) Verify anyone without the suggestions manage permission has not recieved the new permissions
6) Enable only the create permission for a librarian
7) Verify that librarian can only create new suggestions ( not manage or delete )
8) Enable only the manage permission for a librarian
9) Verify that librarian can only manage existing suggestions ( not create or delete )
10) Enable only the delete permission for a librarian
11) Verify that librarian can only delete suggestions ( not create or manage )

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Comment 5 Jonathan Druart 2023-10-04 14:00:27 UTC
Please rebase and add REST API tests.
Comment 6 Kyle M Hall 2024-01-11 13:59:10 UTC
Created attachment 160846 [details] [review]
Bug 33363: Add separate permissions for creating and deleting suggestions

There are a number of libraries that would like for their staff to be able to submit (and view existing) purchase suggestions from the borrower record, but not give the staff the ability to edit/manage/delete purchase suggestions.

Test Plan:
1) Apply this patch
2) Run restart all the things!
3) Run updatedatabase
4) Verify anyone with the suggestions manage permissions now has the create and delete permissions as well
5) Verify anyone without the suggestions manage permission has not recieved the new permissions
6) Enable only the create permission for a librarian
7) Verify that librarian can only create new suggestions ( not manage or delete )
8) Enable only the manage permission for a librarian
9) Verify that librarian can only manage existing suggestions ( not create or delete )
10) Enable only the delete permission for a librarian
11) Verify that librarian can only delete suggestions ( not create or manage )

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Comment 7 Kyle M Hall 2024-01-11 13:59:17 UTC
Created attachment 160847 [details] [review]
Bug 33363: Add unit tests
Comment 8 Martin Renvoize 2024-01-12 09:33:46 UTC
Created attachment 160902 [details] [review]
Bug 33363: Add separate permissions for creating and deleting suggestions

There are a number of libraries that would like for their staff to be able to submit (and view existing) purchase suggestions from the borrower record, but not give the staff the ability to edit/manage/delete purchase suggestions.

Test Plan:
1) Apply this patch
2) Run restart all the things!
3) Run updatedatabase
4) Verify anyone with the suggestions manage permissions now has the create and delete permissions as well
5) Verify anyone without the suggestions manage permission has not recieved the new permissions
6) Enable only the create permission for a librarian
7) Verify that librarian can only create new suggestions ( not manage or delete )
8) Enable only the manage permission for a librarian
9) Verify that librarian can only manage existing suggestions ( not create or delete )
10) Enable only the delete permission for a librarian
11) Verify that librarian can only delete suggestions ( not create or manage )

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize 2024-01-12 09:33:49 UTC
Created attachment 160903 [details] [review]
Bug 33363: Add unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize 2024-01-12 09:34:27 UTC
Tidied and squash said tidies.

QA scripts now happy, tests make sense and are passing.. controllers updated appropriately.

Passing QA