Bug 35651 - Toggle for advanced editor should not show to staff without advanced_editor permissions
Summary: Toggle for advanced editor should not show to staff without advanced_editor p...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on: 34275
Blocks:
  Show dependency treegraph
 
Reported: 2023-12-26 15:37 UTC by Kelly McElligott
Modified: 2024-02-02 17:55 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the display of the button to access the advanced editor. It now only displays when the staff patron has the correct permissions ("Use the advanced cataloging editor (requires edit_catalogue)").
Version(s) released in:
24.05.00,23.11.02


Attachments
Bug 35651: Add check to make sure user has advanced_editor permission (1.77 KB, patch)
2023-12-27 17:57 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 35651: Add check to make sure user has advanced_editor permission (1.82 KB, patch)
2023-12-27 18:12 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 35651: Add check to make sure user has advanced_editor permission (1.87 KB, patch)
2024-01-15 21:55 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kelly McElligott 2023-12-26 15:37:40 UTC
Bug 34275 introduces a toggle button for users to move from the basic editor to the advanced editor easily.  Currently, this toggle button shows to staff without the advanced editor permission. If a staff chooses to try to toggle to the advanced editor, they will be logged out.  It would be best to not show the toggle button if the staff member does not have the advanced_editor permission.
Comment 1 Lucas Gass 2023-12-27 17:57:03 UTC
Created attachment 160326 [details] [review]
Bug 35651: Add check to make sure user has advanced_editor permission

To test:
1. Turn on the system preference 'EnableAdvancedCatalogingEditor'.
2. Set up a staff user with permissions to editcatlouge but make sure "Use the advanced cataloging editor (requires edit_catalogue)" if OFF.
3. Log in as that patron.
4. Go to a record or create a new one in the basic editor and see the toggle advanced editor button.
5. Try toggling it and you are logged out.
6. APPLY PATCH
7. Try 3 & 4 again, this time there should be no toggle button.
8. Log in as a patron who does havbe the "Use the advanced cataloging editor (requires edit_catalogue)" permission on. They should be able to toggle between editors.
Comment 2 ByWater Sandboxes 2023-12-27 18:12:58 UTC
Created attachment 160327 [details] [review]
Bug 35651: Add check to make sure user has advanced_editor permission

To test:
1. Turn on the system preference 'EnableAdvancedCatalogingEditor'.
2. Set up a staff user with permissions to editcatlouge but make sure "Use the advanced cataloging editor (requires edit_catalogue)" if OFF.
3. Log in as that patron.
4. Go to a record or create a new one in the basic editor and see the toggle advanced editor button.
5. Try toggling it and you are logged out.
6. APPLY PATCH
7. Try 3 & 4 again, this time there should be no toggle button.
8. Log in as a patron who does havbe the "Use the advanced cataloging editor (requires edit_catalogue)" permission on. They should be able to toggle between editors.

Signed-off-by: Kelly <kelly@bywatersolutions.com>
Comment 3 David Nind 2023-12-27 19:05:40 UTC
Hi Kelly!

Could you update the status to signed off? (Then you will get the credit on the dashboard!)

David
Comment 4 Victor Grousset/tuxayo 2024-01-15 21:55:43 UTC
Created attachment 161051 [details] [review]
Bug 35651: Add check to make sure user has advanced_editor permission

To test:
1. Turn on the system preference 'EnableAdvancedCatalogingEditor'.
2. Set up a staff user with permissions to editcatlouge but make sure "Use the advanced cataloging editor (requires edit_catalogue)" if OFF.
3. Log in as that patron.
4. Go to a record or create a new one in the basic editor and see the toggle advanced editor button.
5. Try toggling it and you are logged out.
6. APPLY PATCH
7. Try 3 & 4 again, this time there should be no toggle button.
8. Log in as a patron who does havbe the "Use the advanced cataloging editor (requires edit_catalogue)" permission on. They should be able to toggle between editors.

Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 5 Victor Grousset/tuxayo 2024-01-15 21:56:00 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 6 Katrin Fischer 2024-01-16 11:09:35 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 7 Fridolin Somers 2024-01-17 09:51:03 UTC
Pushed to 23.11.x for 23.11.02