Created attachment 161263 [details] [review] Bug 35871: Adding new subpermission merge_delete_authorities Sponsored-by: Education Services Australia SCIS
Created attachment 161318 [details] [review] Bug 35871: Adding new subpermission merge_delete_authorities Test plan: - apply patch - login to staff client with your personal user - make a new test user - set the new test user's permissions to catalogue so they can access the staff client - logout and log back in to the staff client as the new test user - go to Authorities - do a search - notice there is no drop down next to each authority search result - logout and log back in to the staff client as your personal user - edit the new test user - add permission editauthorities and subpermission merge_delete_authorities - logout and log back in to the staff client as the test user - go to Authorities - do a search - notice how you there is an "Actions" dropdown next to each of the authority search results - click the Action dropdown and notice you can merge - check you can merge results - also check you can delete a result that has 0 records Sponsored-by: Education Services Australia SCIS
Created attachment 161319 [details] [review] Bug 35871: Adding new subpermission merge_delete_authorities Test plan: - apply patch from Bug 35870 - apply patch - login to staff client with your personal user - make a new test user - set the new test user's permissions to catalogue so they can access the staff client - also set the new test user's permissions to subpermission edit_authorities, but not merge_delete_auhtorities - logout and log back in to the staff client as the new test user - go to Authorities - do a search - notice there is an 'Actions' drop down next to each authority search result - notice that the drop down does not give you the option to choose Merge or Delete - logout and log back in to the staff client as your personal user - edit the new test user - add subpermission merge_delete_authorities - logout and log back in to the staff client as the test user - go to Authorities - do a search - notice how you there is an 'Actions' dropdown next to each of the authority search results - click the Action dropdown and notice you can merge - check you can merge results - also check you can delete a result that has 0 records Sponsored-by: Education Services Australia SCIS
Patch does not apply
Created attachment 177209 [details] [review] Bug 35871: Adding new subpermission merge_delete_authorities Test plan: - apply patch from Bug 35870 - apply patch - login to staff client with your personal user - make a new test user - set the new test user's permissions to catalogue so they can access the staff client - also set the new test user's permissions to subpermission edit_authorities, but not merge_delete_auhtorities - logout and log back in to the staff client as the new test user - go to Authorities - do a search - notice there is an 'Actions' drop down next to each authority search result - notice that the drop down does not give you the option to choose Merge or Delete - logout and log back in to the staff client as your personal user - edit the new test user - add subpermission merge_delete_authorities - logout and log back in to the staff client as the test user - go to Authorities - do a search - notice how you there is an 'Actions' dropdown next to each of the authority search results - click the Action dropdown and notice you can merge - check you can merge results - also check you can delete a result that has 0 records Sponsored-by: Education Services Australia SCIS
(In reply to Laurence Rault from comment #4) > Patch does not apply thanks, I have added a new one now :)
The patch still applies, however the database update to add the new permission doesn't work.
Created attachment 177495 [details] [review] Bug 35871: Add new subpermission merge_delete_authorities Add a new sub permission for merging and deleting authority records. Test plan: 1. Apply the patch (including bug 35870). 2. Update the database. 3. Login to the staff interface as a superlibrarian. 4. Add or edit an existing staff patron. 5. Set the patron's permissions to catalogue so they can access the staff interface. 6. Also add the edit_authorities permission, but not merge_delete_authorities. 7. Logout and log back in to the staff interface as the patron. 8. Go to Authorities. 9. Search for an authority record, for example search for 'a'. 10. Notice that there is an 'Actions' dropdown next to each authority search result. 11. Notice that the dropdown does not give you the option to choose Merge or Delete 12. Logout and log back in to the staff interface as a superlibrarian. 13. Edit the staff patron - add the sub permission merge_delete_authorities. 14. Logout and log back in to the staff interface as the staff patron. 15. Repeat steps 8 to 9. 16. Click the Action dropdown and notice you can merge. 17. Check that you can merge authority records. 18. Also check you can delete a search result that has 0 records. Sponsored-by: Education Services Australia SCIS
I fixed the database update (using bug 35870 as a pattern) and updated the commit message. However, I got login and CSRF errors when attempting to merge a record - so I have left the status as Failed QA. Bug 36192. I also think the colour/style needs changing for the merge message box with the bootstrap 5 update and styles for the different types of information boxes - see bug 35402 and bug 38519. To replicate: 1. Log in with the staff patron with edit_authorities and merge_delete_authorities. 2. Go to Authorities. 3. Search for an authority record, for example, 'a'. 4. For one record, from the 'Actions' select 'Merge' 5. A blue message box appears with "Merging with authority....". 6. For another term (of the same type) select Action > Merge. 7. The two record titles are displayed and you can select which one and then Next. 8. Note that you get the log in box with: Error: Session timed out. Please log in again 9. Log in again, you get the pages to select some tags from each record so that there is material in the destination record. 10. Click "Merge". 11. You get an error: An error has occurred! Error 403 The form submission failed (Wrong CSRF token). Try to come back, refresh the page, then try again.
(In reply to David Nind from comment #9) > I fixed the database update (using bug 35870 as a pattern) and updated the > commit message. Thank you for that! > > However, I got login and CSRF errors when attempting to merge a record - so > I have left the status as Failed QA. Bug 36192. > > I also think the colour/style needs changing for the merge message box with > the bootstrap 5 update and styles for the different types of information > boxes - see bug 35402 and bug 38519. Do you think that should be done in this bug report or a separate one? > > To replicate: > > 1. Log in with the staff patron with edit_authorities and > merge_delete_authorities. > 2. Go to Authorities. > 3. Search for an authority record, for example, 'a'. > 4. For one record, from the 'Actions' select 'Merge' > 5. A blue message box appears with "Merging with authority....". > 6. For another term (of the same type) select Action > Merge. > 7. The two record titles are displayed and you can select which one and then > Next. > 8. Note that you get the log in box with: > Error: Session timed out. > Please log in again > 9. Log in again, you get the pages to select some tags from each record so > that there is material in the destination record. > 10. Click "Merge". > 11. You get an error: > An error has occurred! > Error 403 > The form submission failed (Wrong CSRF token). Try to come back, refresh > the page, then try again. Hmm, I am not getting the same output, I am not getting step 8. I am able to successfully merge.