Bug 20367

Summary: userid resets to firstname.surname when BorrowerUnwantedField contains userid
Product: Koha Reporter: Lari Taskula <lari.taskula>
Component: PatronsAssignee: Lari Taskula <lari.taskula>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, kyle.m.hall, nick
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14867
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 20367: Avoid resetting userid when BorrowerUnwantedField contains userid
Bug 20367: Avoid resetting userid when BorrowerUnwantedField contains userid
Bug 20367: Avoid resetting userid when BorrowerUnwantedField contains userid

Description Lari Taskula 2018-03-09 13:42:22 UTC
To replicate:
1. In staff client, set your username to firstname
2. Add userid to BorrowerUnwantedField system preference
3. Go to your patron modification screen (memberentry.pl) and click Save
4. Observe you get kicked out into login screen, saying:
Error: You do not have permission to access this page.
Log in as a different user
Comment 1 Lari Taskula 2018-03-09 13:51:46 UTC
Created attachment 72592 [details] [review]
Bug 20367: Avoid resetting userid when BorrowerUnwantedField contains userid

To test:
1. In staff client, set your username to firstname
2. Add userid to BorrowerUnwantedField system preference
3. Go to your patron modification screen (memberentry.pl) and click Save
4. Observe you get kicked out into login screen, saying:
Error: You do not have permission to access this page.
Log in as a different user

5. Apply patch and restart plack

6. Set your username back to firstname
7. Repeat step 3
8. Observe you were not kicked out and your userid stays the same
Comment 2 Lari Taskula 2018-03-09 14:04:12 UTC
Additionally, make sure test plan provided in Bug 14867 still works.
Comment 3 Brendan Gallagher 2018-03-13 14:51:10 UTC
Created attachment 72786 [details] [review]
Bug 20367: Avoid resetting userid when BorrowerUnwantedField contains userid

To test:
1. In staff client, set your username to firstname
2. Add userid to BorrowerUnwantedField system preference
3. Go to your patron modification screen (memberentry.pl) and click Save
4. Observe you get kicked out into login screen, saying:
Error: You do not have permission to access this page.
Log in as a different user

5. Apply patch and restart plack

6. Set your username back to firstname
7. Repeat step 3
8. Observe you were not kicked out and your userid stays the same

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Comment 4 Katrin Fischer 2018-03-13 16:03:00 UTC
Created attachment 72803 [details] [review]
Bug 20367: Avoid resetting userid when BorrowerUnwantedField contains userid

To test:
1. In staff client, set your username to firstname
2. Add userid to BorrowerUnwantedField system preference
3. Go to your patron modification screen (memberentry.pl) and click Save
4. Observe you get kicked out into login screen, saying:
Error: You do not have permission to access this page.
Log in as a different user

5. Apply patch and restart plack

6. Set your username back to firstname
7. Repeat step 3
8. Observe you were not kicked out and your userid stays the same

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2018-03-19 18:31:47 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 6 Nick Clemens 2018-03-23 12:53:43 UTC
Awesome work all! Pushed to stable for 17.11.04
Comment 7 Fridolin Somers 2018-03-27 11:49:34 UTC
Pushed to 17.05.x for v17.05.10