[Bug 39927] New: Add permissions check to PatronSelfRegistrationAlert on home page
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 Bug ID: 39927 Summary: Add permissions check to PatronSelfRegistrationAlert on home page Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Depends on: 35028
From Bug 35028:
(In reply to Katrin Fischer from comment #14)> 1) Permission check
We don't have a permission check. I feel that could lead to the situation where a staff user tries to resolve, but is then faced with a permission error trying to access the patron page as they are not allowed to view patron accounts of this library.
Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35028 [Bug 35028] Add OPAC self-registration alert on staff interface main page -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 182547 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182547&action=edit Bug 39927: Add permissions check to PatronSelfRegistrationAlert on home page This patch adds a permissions check around the display of PatronSelfRegistrationAlert information on the staff interface home page. To test, apply the patch and follow the test plan on Bug 35028: 1. Create patron category SELFREG 2. Enable PatronSelfRegistration and set PatronSelfRegistrationDefaultCategory to SELFREG and PatronSelfRegistrationAlert to "Show" 3. Go to OPAC, logout if needed, and create a new account. Remember the value you set for home library. 4. Go to staff interface, set the current library to the one you set in step 3. Now view the staff interface home page as two different users: - A user with either CAN_user_borrowers_edit_borrowers or CAN_user_borrowers_list_borrowers permission. - A user with neither. - The self-registration information should display or not depending on the user's permission. Sponsored-by: Athens County Public Libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Status|Needs Signoff |Failed QA --- Comment #2 from David Nind <david@davidnind.com> --- I've Failed QA. The only difference I noted was that with no borrowers permission: 1. After the patch you don't see the the "Self-registrations from: XX" section on the home page (as expected). 2. However, there is a white section under the links to the modules with no text. Note that you also get a 403: Forbidden error and "Processing" message with edit_borrowers permission, both before and after the patch. Possibly this should be on another bug (if it doesn't already exist)? Testing notes (using KTD): 1. System prference set up: . Already enabled by default in KTD: PatronSelfRegistration and set PatronSelfRegistrationDefaultCategory to SELFREG . Need to set PatronSelfRegistrationAlert to "Show" 2. Used Henry Acevedo, Midway library, set up with permission: Staff access, allows viewing of catalogue in staff interface (catalogue). 3. Self-registration patron created - Centerville library 4. Permissions to experiment with: - Add, modify and view patron information (borrowers) - Add, modify and view patron information (edit_borrowers) - Search, list and view patrons (list_borrowers) 5. Before the patch: - With no borrowers permission: . sees Self-registrations from: All libraries: 1 . if you try to access, you get a log in screen with "Error: You do not have permission to access this page." - With borrowers permission: . sees Self-registrations from: All libraries: 1 . this lists all the borrowers in the self-registration category . can edit and delete borrowers listed - With edit_borrowers permission only: . sees Self-registrations from: All libraries: 1 . pop-up error message saying "Something went wrong when loading the table. 403: Forbiddden. OK" . table is shown, but sits with "Processing" shown. - With list_borrowers permission only: . sees Self-registrations from: All libraries: 1 . no patrons listed . the Library filter only shows Midway - can't select any other library 6. After the patch: - With no borrowers permission: . Sees a white section under the links to the modules - With borrowers permission (same as before the patch): . sees Self-registrations from: All libraries: 1 . this lists all the borrowers in the seff-registration category . can edit and delete borrowers listed - With edit_borrowers permission only (same as before the patch): . sees Self-registrations from: All libraries: 1 . pop-up error message saying "Something went wrong when loading the table. 403: Forbiddden. OK" . table is shown, but sits with "Processing" shown. - With list_borrowers (same as before the patch): . sees Self-registrations from: All libraries: 1 . no patrons listed . the Library filter only shows Midway - can't select any other library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 182799 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182799&action=edit Bug 39927: (follow-up) Add permission check to display of page section -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182547|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 182882 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182882&action=edit Bug 39927: Add permissions check to PatronSelfRegistrationAlert on home page This patch adds a permissions check around the display of PatronSelfRegistrationAlert information on the staff interface home page. To test, apply the patch and follow the test plan on Bug 35028: 1. Create patron category SELFREG 2. Enable PatronSelfRegistration and set PatronSelfRegistrationDefaultCategory to SELFREG and PatronSelfRegistrationAlert to "Show" 3. Go to OPAC, logout if needed, and create a new account. Remember the value you set for home library. 4. Go to staff interface, set the current library to the one you set in step 3. Now view the staff interface home page as two different users: - A user with either CAN_user_borrowers_edit_borrowers or CAN_user_borrowers_list_borrowers permission. - A user with neither. - The self-registration information should display or not depending on the user's permission. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182799|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 182883 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182883&action=edit Bug 39927: (follow-up) Add permission check to display of page section Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement fixes the release notes| |staff interface home page | |so that the | |"Self-registrations from" | |alert is only shown if the | |staff patron has the | |correct permissions. Before | |this, the alert was shown | |when the staff patron | |didn't have any borrower | |permissions. --- Comment #6 from David Nind <david@davidnind.com> --- Thanks Owen for the follow-up! Updated testing notes: 1. After the patch and with no borrowers permissions, there is no empty white section under the links to the modules (as expected). 2. Both before and after the patch, if a staff patron has only the edit_borrowers permission: - The staff patron sees "Self-registrations from: All libraries: 2 / Midway: 1" (I created two self-registrations - one for Centerville, one for Midway) - When you access the self-registrations page, you get a pop-up error message saying "Something went wrong when loading the table. 403: Forbiddden. OK" - The table to list self-registration patrons is shown, but has a "Processing" message shown, and no patrons listed. - This is the same as when you go to the patrons module, and search or browse for patrons. - In this case, you would need edit_borrowers and list_borrowers permissions for this to work correctly - that is, if you have edit_borrowers you also need list_borrowers. Otherwise, this would be another bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 Bug 39927 depends on bug 35028, which changed state. Bug 35028 Summary: Add OPAC self-registration alert on staff interface main page https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35028 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182882|0 |1 is obsolete| | --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 190992 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190992&action=edit Bug 39927: Add permissions check to PatronSelfRegistrationAlert on home page This patch adds a permissions check around the display of PatronSelfRegistrationAlert information on the staff interface home page. To test, apply the patch and follow the test plan on Bug 35028: 1. Create patron category SELFREG 2. Enable PatronSelfRegistration and set PatronSelfRegistrationDefaultCategory to SELFREG and PatronSelfRegistrationAlert to "Show" 3. Go to OPAC, logout if needed, and create a new account. Remember the value you set for home library. 4. Go to staff interface, set the current library to the one you set in step 3. Now view the staff interface home page as two different users: - A user with either CAN_user_borrowers_edit_borrowers or CAN_user_borrowers_list_borrowers permission. - A user with neither. - The self-registration information should display or not depending on the user's permission. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182883|0 |1 is obsolete| | --- Comment #8 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 190993 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190993&action=edit Bug 39927: (follow-up) Add permission check to display of page section Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com QA Contact|testopia@bugs.koha-communit |lucas@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 --- Comment #9 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39927 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting --- Comment #10 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- This bug won't be backported to the 25.11.x branch as it has been deemed an enhancement or new feature. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org