Work to be done: 1) Create a new permission, under the "cataloguing" module, that controls whether the professional cataloging editor is available.
Created attachment 83416 [details] [review] Bug 20128: Add permission for advanced cataloging editor To test: 1 - Have a borrower with edit_catalogue permission and one with editcatalogue top level 2 - Confirm they can both access the advanced editor from the 'Cataloguing' home page or from the basic editor 3 - Apply patch 4 - Update database 5 - Confirm borrower with 'edit_catalogue' has 'advanced_editor' permission 6 - Confirm borrowers can access advanced editor as above 7 - Remove 'advanced_editor' permission from borrower 8 - Ensure they cannot access the advanced editor 9 - Ensure links to 'Edit record' from search results go to basic editor
Created attachment 86198 [details] [review] Bug 20128: Add permission for advanced cataloging editor To test: 1 - Have a borrower with edit_catalogue permission and one with editcatalogue top level 2 - Confirm they can both access the advanced editor from the 'Cataloguing' home page or from the basic editor 3 - Apply patch 4 - Update database 5 - Confirm borrower with 'edit_catalogue' has 'advanced_editor' permission 6 - Confirm borrowers can access advanced editor as above 7 - Remove 'advanced_editor' permission from borrower 8 - Ensure they cannot access the advanced editor 9 - Ensure links to 'Edit record' from search results go to basic editor
Created attachment 86208 [details] [review] Bug 20128: Add permission for advanced cataloging editor To test: 1 - Have a borrower with edit_catalogue permission and one with editcatalogue top level 2 - Confirm they can both access the advanced editor from the 'Cataloguing' home page or from the basic editor 3 - Apply patch 4 - Update database 5 - Confirm borrower with 'edit_catalogue' has 'advanced_editor' permission 6 - Confirm borrowers can access advanced editor as above 7 - Remove 'advanced_editor' permission from borrower 8 - Ensure they cannot access the advanced editor 9 - Ensure links to 'Edit record' from search results go to basic editor Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Created attachment 86543 [details] [review] Bug 20128: Add permission for advanced cataloging editor To test: 1 - Have a borrower with edit_catalogue permission and one with editcatalogue top level 2 - Confirm they can both access the advanced editor from the 'Cataloguing' home page or from the basic editor 3 - Apply patch 4 - Update database 5 - Confirm borrower with 'edit_catalogue' has 'advanced_editor' permission 6 - Confirm borrowers can access advanced editor as above 7 - Remove 'advanced_editor' permission from borrower 8 - Ensure they cannot access the advanced editor 9 - Ensure links to 'Edit record' from search results go to basic editor Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Yeay for bug 22031 and it's first real use here :) All works as expected.. I had to do a minor rebase to get it to apply again. Passing QA
Created attachment 86706 [details] [review] Bug 20128: Add permission for advanced cataloging editor To test: 1 - Have a borrower with edit_catalogue permission and one with editcatalogue top level 2 - Confirm they can both access the advanced editor from the 'Cataloguing' home page or from the basic editor 3 - Apply patch 4 - Update database 5 - Confirm borrower with 'edit_catalogue' has 'advanced_editor' permission 6 - Confirm borrowers can access advanced editor as above 7 - Remove 'advanced_editor' permission from borrower 8 - Ensure they cannot access the advanced editor 9 - Ensure links to 'Edit record' from search results go to basic editor Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 86707 [details] [review] Bug 20128: Problem when checking individual perms where borrower has top level
(In reply to Nick Clemens from comment #7) > Created attachment 86707 [details] [review] [review] > Bug 20128: Problem when checking individual perms where borrower has top > level Martin, can you look here, I added a test to highlight the problem. If the user has all 'Edit catalogue' permissions then we get an error
Sorry Nick, I hadn't spotted this.. I'm in meetings all day today but will hit it as my first priority on Friday.
Created attachment 86840 [details] [review] Bug 20128: (QA Follow-up) Corrections to haspermission The haspermission routine wrongly assumed that get_user_subpermissions would return a list of all subpermissions if the user had the top level permission, but instead if just returns 1. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
OK, I found a moment at the beginning of my meeting ;) I've uploaded one option which uses the existing structure created by get_user_subpermissions, however there is an alternate option we could follow of adapting getuserpermissions to return all subpermissions in a hash if the top level flag is set rather than just returning the boolean 1.
Created attachment 87738 [details] [review] Bug 20128: Add permission for advanced cataloging editor To test: 1 - Have a borrower with edit_catalogue permission and one with editcatalogue top level 2 - Confirm they can both access the advanced editor from the 'Cataloguing' home page or from the basic editor 3 - Apply patch 4 - Update database 5 - Confirm borrower with 'edit_catalogue' has 'advanced_editor' permission 6 - Confirm borrowers can access advanced editor as above 7 - Remove 'advanced_editor' permission from borrower 8 - Ensure they cannot access the advanced editor 9 - Ensure links to 'Edit record' from search results go to basic editor Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 87739 [details] [review] Bug 20128: Problem when checking individual perms where borrower has top level Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 87740 [details] [review] Bug 20128: (QA follow-up) Corrections to haspermission The haspermission routine wrongly assumed that get_user_subpermissions would return a list of all subpermissions if the user had the top level permission, but instead if just returns 1. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 87741 [details] [review] Bug 20128: Add new permission for new installations Change was missing from userpermissions.sql
Hi Nick, please check my follow-up!
Followup looks solid to me Katrin.
Awesome work all! Pushed to master for 19.05
Created attachment 88196 [details] [review] Bug 20128: (QA follow-up) Rename flgAnonymized column for anonymized This patch renames the flgAnonymized column for anonymized, and it also sets it to - TINYINT(1) - NOT NULL The ALTER TABLE updatedatabase entries are adjusted to make sure the column will be added after overdrive_... always, and preventing backporting issues. Just in case. Tests are adjusted to reflect the changes, as well as Koha::Patrons Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 88197 [details] [review] Bug 20128: Fix the API Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Enhancement will not be backported to 18.11.x series.