To recreate: 1 - Give a patron full acquisitions permissions 2 - Also give them several subpermissions on other areas 3 - Go to Acquisitions 4 - Edit a fund 5 - Add a user to the fund 6 - Search for user above 7 - They return multiple times in results
Created attachment 106283 [details] [review] Bug 25875: Unit test
Created attachment 106284 [details] [review] Bug 25875: Move check for module_bit and code to the JOIN If we limit the JOIN to rows with the correct subpermission we won't duplicate the returned patrons To test: 1 - Give a patron full acquisitions permissions 2 - Also give them several subpermissions on other areas 3 - Go to Acquisitions 4 - Edit a fund 5 - Add a user to the fund 6 - Search for user above 7 - They return multiple times in results 8 - Apply patch 9 - Restart all the things 10 - Repeat search 11 - Patron appears once
Created attachment 106285 [details] [review] Bug 25875: Unit test
Created attachment 106286 [details] [review] Bug 25875: Move check for module_bit and code to the JOIN If we limit the JOIN to rows with the correct subpermission we won't duplicate the returned patrons To test: 1 - Give a patron full acquisitions permissions 2 - Also give them several subpermissions on other areas 3 - Go to Acquisitions 4 - Edit a fund 5 - Add a user to the fund 6 - Search for user above 7 - They return multiple times in results 8 - Apply patch 9 - Restart all the things 10 - Repeat search 11 - Patron appears once Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Unit tests pass even without the 2nd patch, can you take a look Nick please ?
Created attachment 106341 [details] [review] Bug 25875: Unit test
Created attachment 106363 [details] [review] Bug 25875: Move check for module_bit and code to the JOIN If we limit the JOIN to rows with the correct subpermission we won't duplicate the returned patrons To test: 1 - Give a patron full acquisitions permissions 2 - Also give them several subpermissions on other areas 3 - Go to Acquisitions 4 - Edit a fund 5 - Add a user to the fund 6 - Search for user above 7 - They return multiple times in results 8 - Apply patch 9 - Restart all the things 10 - Repeat search 11 - Patron appears once Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 106364 [details] [review] Bug 25875: Unit test Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.02
backported to 19.11.x for 19.11.08
Backported to 19.05.x branch for 19.05.14