Bug 40868

Summary: Vendor module permissions are ignored
Product: Koha Reporter: Matt Blenkinsop <matt.blenkinsop>
Component: AcquisitionsAssignee: Matt Blenkinsop <matt.blenkinsop>
Status: Needs documenting --- QA Contact: Laura Escamilla <Laura.escamilla>
Severity: normal    
Priority: P5 - low CC: baptiste.wojtkowski, blawlor, Laura.escamilla, lucas, michaela.sieber, mspinney
Version: MainKeywords: rel_25_05_candidate
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00,25.05.05
Circulation function:
Bug Depends on: 40684    
Bug Blocks:    
Attachments: Bug 40868: Restore full list of permissions to the vendors app
Bug 40868: Restore full list of permissions to the vendors app
Bug 40868: Restore full list of permissions to the vendors app

Description Matt Blenkinsop 2025-09-24 09:11:34 UTC
In the vendors vue app, if a patron doesn't have the full set of permissions (i.e. acquisitions: '*') then all acquisitions permissions are ignored

To recreate:
1) Create or edit a user to have all acquisitions permissions except one (not relevant which one, any will do)
2) Log into the staff interface and go to acquisitions > vendors and click the vendor in the table
3) The left menu will be missing everything except invoices
Comment 1 Matt Blenkinsop 2025-09-24 09:13:57 UTC
Created attachment 186859 [details] [review]
Bug 40868: Restore full list of permissions to the vendors app

This patch adjusts the logic to consider all permissions and not just the top level flags

Test plan:
1) Create or edit a user to have all acquisitions permissions except one (not relevant which one, any will do)
2) Log into the staff interface and go to acquisitions > vendors and click the vendor in the table
3) The left menu will be missing everything except invoices
4) Apply patch and restart_all
5) Refresh the page, the menu should now be populated
Comment 2 OpenFifth Sandboxes 2025-09-25 11:44:43 UTC
Created attachment 186919 [details] [review]
Bug 40868: Restore full list of permissions to the vendors app

This patch adjusts the logic to consider all permissions and not just the top level flags

Test plan:
1) Create or edit a user to have all acquisitions permissions except one (not relevant which one, any will do)
2) Log into the staff interface and go to acquisitions > vendors and click the vendor in the table
3) The left menu will be missing everything except invoices
4) Apply patch and restart_all
5) Refresh the page, the menu should now be populated

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Comment 3 Laura Escamilla 2025-09-26 17:22:57 UTC
Created attachment 186996 [details] [review]
Bug 40868: Restore full list of permissions to the vendors app

This patch adjusts the logic to consider all permissions and not just the top level flags

Test plan:
1) Create or edit a user to have all acquisitions permissions except one (not relevant which one, any will do)
2) Log into the staff interface and go to acquisitions > vendors and click the vendor in the table
3) The left menu will be missing everything except invoices
4) Apply patch and restart_all
5) Refresh the page, the menu should now be populated

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Comment 4 Lucas Gass (lukeg) 2025-09-29 20:08:18 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 5 Brendan Lawlor 2025-09-30 16:30:32 UTC
*** Bug 40912 has been marked as a duplicate of this bug. ***
Comment 6 Paul Derscheid 2025-10-23 21:11:15 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 7 Baptiste Wojtkowski (bwoj) 2025-10-31 15:02:26 UTC
Depends on Bug 40684 not in 24.11.x