Bug 37877 - Fix selecting fund users requiring budget_modify permission
Summary: Fix selecting fund users requiring budget_modify permission
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-09-10 08:52 UTC by Mathieu Saby
Modified: 2024-09-10 13:32 UTC (History)
0 users

See Also:
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 Mathieu Saby 2024-09-10 08:52:07 UTC
The name and description of this permmission are misleading

Here is the description : "Modify funds (can't create lines, but can modify existing ones)"

I suppose "lines" are used here for "orders". So with that permission you cannot "modify" funds (change their name, their amount, etc), for that you need budget_manage. 

If I understand well, with that permission you only can "use" a fund in a specific order, and it must be selected with order_manage in order to be able to create orders, and with order_receive in order to change fund when a parcel is received. 

Maybe it should be "fund_use", with the appropriate description?
Comment 1 Katrin Fischer 2024-09-10 11:27:30 UTC
I don't think the permission description is wrong, the behavior of the form configuring fund users is wrong.

Fund users are implied to be users that can order from a fund. 

If you are a fund user and have receive_order etc., you can use that fund for ordering.
If you are a fund user and have budget_manage, you should probably be able to edit the fund.

But when adding fund users the list of patrons is limited by default to those having budget_manage and that is wrong. It should probably include users with any acq permission or another select list of multiple (receive_order, order_manage, etc.
Comment 2 Mathieu Saby 2024-09-10 13:32:00 UTC
I'm not sure of the intended behavior of the preference.

It is used in C4::Budgets::CanUserModifyBudget, which is called in admin/aqbudgets.pl 

If I create a staff user with just this only permission in Acquisitions permission, 
- he can display admin/aqbudgets.pl 
- he can only see the funds whose access permission is "Restrict access to: None"
- he cannot modify the funds he can see (he can not open /admin/aqbudgets.pl page)

As an admin I can search him from a fund page, with "Select owner" or "Add users", and give him permission over a "restricted" fund.

Now 
- he can see this new fund in admin/aqbudgets.pl 
- but he cannot modify it

So I stil don't understand the terminology "Modify fund"...

Note that "Modify fund" is used in template of /admin/aqbudgets.pl in breadcrumbs.