Bug 38278 - Having access to subfund but not parent fund will break filters in acqui-home
Summary: Having access to subfund but not parent fund will break filters in acqui-home
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-28 13:00 UTC by Baptiste Wojtkowski (bwoj)
Modified: 2024-10-28 13:13 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Baptiste Wojtkowski (bwoj) 2024-10-28 13:00:34 UTC
If you have access to sub founds but not to the found they are children of, filters will be broken as soon as you try to access acqui-home.

To reproduce:
Prerequisites: 1 superlibrarian (S) and two staff members (A & B)
1 - Set permissions of A to: staff interface and  budget_manage (do NOT check budget_manage_all).
2 - Set permissions of librarian B to: staff interface, acquisitions
3 - Create an active budget
4 - In this budget create a found (F1), give librarian B the ownership
5 - In this fund, create two subfound (SF1 and SF2), give librarian A the ownership
6 - create an inactive budget with a found (IF1)
7 - Log in as A, go to acquisition.pl, notice eveything works, you can see found F1, subfounds SF1 and SF2 and inactive found IF1, buttons "Expand all"," Collapse all","Hide inactive budgets ","Show inactive budgets" and dropdown menu work.
8 - Go to F1 and restrict the access to owner
9 - Repeat 6 -> the datatable is broken, you do not see F1 (expected) see SF1 and SF2 (expected) and see inactive found IF1 (unexpected), buttons "Expand all"," Collapse all","Hide inactive budgets ","Show inactive budgets" and dropdown menu do not work anymore + you have a js error in your console.

This is very probably due to the tree structure not working since the parent node of owned subfounds is not returned by acqui-home.pl
Comment 1 Baptiste Wojtkowski (bwoj) 2024-10-28 13:13:54 UTC
Note: Librarian A also needs budget_modify