Final fix to make "Check out: View Fees/Fines" work as expected

Description

The permission ui-checkout.viewFeeFines- "Check out: View fees/fines" - was implemented in Iris to support needed functionality in the Check Out app.

In the Check Out app, libraries wanted to present information about a patron's owed fee/fines without necessarily giving full access to a patron's record.

The idea was that a patron with just ui-checkout.all would get text of the amount owed, but a patron with access to the check out app PLUS "Check out: view fees/fines" would get a link that would take them into the Users app to view more information about the patron's fine history.

However, this permission was never able to work as expected because a permission to simply view fees/fines didn't exist yet in the Users app. See UICHKOUT-729 for a discussion about how the functionality was broken.

So, the link in the Scan card pane was coded to require ui-users.accounts, but ui-users.accounts grants way too much access to fine functionality.

A permission to view fees/fines (and loans, which is necessary for being able to view complete fine information) was implemented in Kiwi Bugfix - see .

The permission is ui-users.feesfines.view

Now that this permission exists, we need to fix the desired functionality of "Check out: View fees/fines" by updating the permission control:

https://github.com/folio-org/ui-checkout/blob/master/src/components/UserDetail/Loans.js#L87

Rather than requiring ui-checkout.viewfeefines and ui-users.accounts to make the link work, we need to require ui-checkout.viewFeeFines and ui-users.feesfines.view to finally get to the way this link was spec'd out to work.

Acceptance criteria
1. A user assigned "ui-checkout.circulation" and "ui-checkout.viewfeesfines" and ui-users.feefines.view with no other permissions in the Users app can view a patron record in the Scan card pane. If the user has fines, they can click the fine amount as a link and have it open the fine information in the Users app.
2. A user assigned "ui-checkout.circulation" and NOT assigned "ui-checkout.viewfeesfines" will be able to view a patron record in the Scan card pane. If the user has fines, they are able to see the amount as text, but the amount is not a link to the fine information in the user record.

Environment

None

Potential Workaround

None

Attachments

3

Checklist

hide

TestRail: Results

Activity

Show:

(OLD ACCOUNT) Erin NettifeeMay 18, 2023 at 4:34 PM

PO reviewed on Snapshot; works as expected.

Oleksandr HrushaMay 18, 2023 at 1:30 PM

Hello   could you please review the story?

Oleksandr HrushaMay 18, 2023 at 1:29 PM

Checked on snapshot, work as expected, see attachments:

Dmitriy LitvinenkoApril 27, 2023 at 1:25 PM

Permissions name:

ui-checkout.circulation Check out: Check out circulating items
ui-checkout.viewFeeFines Check out: View fees/fines
ui-users.feesfines.view Users: Can view fees/fines and loans

Dmitriy LitvinenkoApril 20, 2023 at 1:50 PM

Thank you

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Vega

Fix versions

Release

Poppy (R2 2023)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created April 7, 2022 at 8:31 PM
Updated September 1, 2023 at 9:59 AM
Resolved May 18, 2023 at 4:34 PM
TestRail: Cases
TestRail: Runs