[Bug 44235] New: Prompt to add sip_client permission to patron when creating SIP account and alert if permission is missing on existing SIP account
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44235 Bug ID: 44235 Summary: Prompt to add sip_client permission to patron when creating SIP account and alert if permission is missing on existing SIP account Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com Depends on: 43106 Target Milestone: --- Bug 43106 adds a dedicated sip_client permission. When one creates a SIP account, it would be helpful if Koha would check the associated patron for that permission, alert the user if the patron lacks the permission, and offer the option to add it. Additionally, there could be an alert on the screen when viewing an existing SIP account for which the associated patron lacks sip_client permission. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43106 [Bug 43106] Patrons used for SIP clients should have separate permission -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44235 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44235 --- Comment #1 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 212438 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212438&action=edit Bug 44235: Prompt to add sip_client permission to SIP2 account patrons Since bug 43106, SIP2 clients need the sip_client permission to log in. This warns staff when the patron linked to a SIP2 account lacks it and offers to add it: - After creating or editing an account, and when viewing one, a dialog says the patron lacks sip_client and offers an "Add permission" button. Staff who can't set permissions get a warning instead, as do staff without staffaccess when the patron is in a staff category. - The SIP2 accounts API gets has_sip_client_permission and patron_is_staff embeds (null when no patron matches login_id) - New endpoint POST /api/v1/sip2/accounts/{sip_account_id}/sip_client_permission grants sip_client to the account's patron, keeping their other permissions. It requires manage_sip2 and permissions, and follows members/member-flags.pl: the patron must be visible to the user, and staff patrons need staffaccess. Test plan: 1. Apply bug 43106 and this patch, run updatedatabase, yarn build, restart_all 2. Pick a patron without sip_client (and not a superlibrarian) 3. Administration > SIP2 > Accounts > New account, use that patron as the staff userid, save 4. Confirm a "Missing sip_client permission" dialog appears 5. Click "Not now", confirm the dialog closes and the patron's permissions are unchanged 6. Reload the account page, confirm the dialog appears again 7. Click "Add permission", confirm the success message and that the patron now has sip_client on their set permissions page, with their other permissions kept 8. Reload the account page, confirm no dialog appears 9. Remove sip_client from the patron, then log in as a staff user with manage_sip2 but not the permissions permission. View the account and confirm you get a warning without an "Add permission" button 10. Move the patron to a staff category (category type Staff). Log in as a staff user with manage_sip2 and permissions but not staffaccess. View the account and confirm you get a warning that the patron is a staff member, without an "Add permission" button 11. Give that user staffaccess, view the account again, confirm the "Add permission" button is offered and works 12. prove t/db_dependent/Koha/SIP2/Accounts.t t/db_dependent/api/v1/sip2_accounts.t 13. yarn cypress run --spec t/cypress/integration/SIP2/Accounts.ts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44235 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@openfifth.c | |o.uk, tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org