Bug 37435 - Cannot renew patron from details page in patron account without circulate permissions
Summary: Cannot renew patron from details page in patron account without circulate per...
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Eric Garcia
QA Contact: Emily Lamancusa (emlam)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-23 15:31 UTC by Lucas Gass (lukeg)
Modified: 2024-09-18 04:04 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.04,23.11.09
Circulation function:


Attachments
Bug 37435: Fixed renew patron from moremember.pl without circulate permissions (4.41 KB, patch)
2024-07-23 18:20 UTC, Eric Garcia
Details | Diff | Splinter Review
Bug 37435: Fixed renew patron from moremember.pl without circulate permissions (4.46 KB, patch)
2024-07-24 18:42 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 37435: Fixed renew patron from moremember.pl without circulate permissions (4.53 KB, patch)
2024-07-25 15:30 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2024-07-23 15:31:13 UTC
To recreate:
1. Have a staff account with limited permissions:
    -Staff access ( catalouge )
    -Add, modify and view patron information (borrowers)
    -NO circulate permissions 
2. Log in as that staff user and find a patron with an expired account.    
3. See the warning "Expiration: Patron's card has expired. Renew or Edit details".
4. Try clicking on Renew, you are logged out and see "Error: You do not have permission to access this page."
Comment 1 Eric Garcia 2024-07-23 18:20:22 UTC
Created attachment 169439 [details] [review]
Bug 37435: Fixed renew patron from moremember.pl without circulate permissions

To recreate:
1. Have a staff account with limited permissions:
    -Staff access ( catalouge )
    -Add, modify and view patron information (borrowers)
    -NO circulate permissions
2. Log in as that staff user and find a patron with an expired account.
3. See the warning "Expiration: Patron's card has expired. Renew or Edit details".
4. Try clicking on Renew, you are logged out and see "Error: You do not have permission to access this page."

To test:
1. Apply patch
2. From the expired patron's details page see the warning and click Renew
3. Notice it renews the patron and returns to the patron details page
4. Details -> Edit -> Set the expiration date so that the patron is expired
5. Go back to your staff patron and check 'Check out and check in items' permission
6. In your expired patron's page -> Check out -> See warning -> Renew
7. Notice it renews the patron and returns to the check out page
8. Set the expired patron's expiration date so that it expires soon
9. Uncheck 'Check out and check in items' permission for your staff patron
10. Confirm the warning for your patron now is "Expiration: Patron's card expires on (DATE). Renew or Edit details"
11. Repeat steps 2-7 and notice it returns to the correct pages
Comment 2 Roman Dolny 2024-07-24 18:42:20 UTC
Created attachment 169513 [details] [review]
Bug 37435: Fixed renew patron from moremember.pl without circulate permissions

To recreate:
1. Have a staff account with limited permissions:
    -Staff access ( catalouge )
    -Add, modify and view patron information (borrowers)
    -NO circulate permissions
2. Log in as that staff user and find a patron with an expired account.
3. See the warning "Expiration: Patron's card has expired. Renew or Edit details".
4. Try clicking on Renew, you are logged out and see "Error: You do not have permission to access this page."

To test:
1. Apply patch
2. From the expired patron's details page see the warning and click Renew
3. Notice it renews the patron and returns to the patron details page
4. Details -> Edit -> Set the expiration date so that the patron is expired
5. Go back to your staff patron and check 'Check out and check in items' permission
6. In your expired patron's page -> Check out -> See warning -> Renew
7. Notice it renews the patron and returns to the check out page
8. Set the expired patron's expiration date so that it expires soon
9. Uncheck 'Check out and check in items' permission for your staff patron
10. Confirm the warning for your patron now is "Expiration: Patron's card expires on (DATE). Renew or Edit details"
11. Repeat steps 2-7 and notice it returns to the correct pages

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 3 Emily Lamancusa (emlam) 2024-07-25 15:30:07 UTC
Created attachment 169567 [details] [review]
Bug 37435: Fixed renew patron from moremember.pl without circulate permissions

To recreate:
1. Have a staff account with limited permissions:
    -Staff access ( catalouge )
    -Add, modify and view patron information (borrowers)
    -NO circulate permissions
2. Log in as that staff user and find a patron with an expired account.
3. See the warning "Expiration: Patron's card has expired. Renew or Edit details".
4. Try clicking on Renew, you are logged out and see "Error: You do not have permission to access this page."

To test:
1. Apply patch
2. From the expired patron's details page see the warning and click Renew
3. Notice it renews the patron and returns to the patron details page
4. Details -> Edit -> Set the expiration date so that the patron is expired
5. Go back to your staff patron and check 'Check out and check in items' permission
6. In your expired patron's page -> Check out -> See warning -> Renew
7. Notice it renews the patron and returns to the check out page
8. Set the expired patron's expiration date so that it expires soon
9. Uncheck 'Check out and check in items' permission for your staff patron
10. Confirm the warning for your patron now is "Expiration: Patron's card expires on (DATE). Renew or Edit details"
11. Repeat steps 2-7 and notice it returns to the correct pages

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 4 Emily Lamancusa (emlam) 2024-07-25 15:31:28 UTC
Looks good, fixes the problem and QA tool passes. Passing QA.
Comment 5 Martin Renvoize (ashimema) 2024-07-26 12:56:05 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant
Comment 6 Lucas Gass (lukeg) 2024-08-29 14:55:50 UTC
Backported to 24.05.x for upcoming 24.05.04
Comment 7 Fridolin Somers 2024-09-10 14:44:44 UTC
Pushed to 23.11.x for 23.11.09

Had to adapt because in 23.11 op=modify instead of op=edit_form
Comment 8 Wainui Witika-Park 2024-09-18 04:04:15 UTC
Not backporting to 23.05.x unless requested