Currently it requires 'circulate => 1' I believe it should be 'circulate => "manage_bookings"'
Created attachment 159851 [details] [review] Bug 35574: Bookings tab from biblio details should only require manage_bookings permission TO test: 1 - Find or create a staff user 2 - Grant permissions: circulate: manage_bookings, circ_remaining_permissions catalogue 3 - Open a record details, go to items tab, mark an item as bookable 4 - Sign out and sign in as the patron above (or use a private window to sign in) 5 - Place a booking on the record located above 6 - Success 7 - Try to view the bookings tab 8 - Fail, you don't have permission 9 - Apply patch 10 - Success!
Created attachment 159852 [details] [review] Bug 35574: Bookings tab from biblio details should only require manage_bookings permission TO test: 1 - Find or create a staff user 2 - Grant permissions: circulate: manage_bookings, circ_remaining_permissions catalogue 3 - Open a record details, go to items tab, mark an item as bookable 4 - Sign out and sign in as the patron above (or use a private window to sign in) 5 - Place a booking on the record located above 6 - Success 7 - Try to view the bookings tab 8 - Fail, you don't have permission 9 - Apply patch 10 - Success! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 159853 [details] [review] Bug 35574: Correct api permission for listing biblio specific bookings To test: 1 - Follow above plan and apply only first patch 2 - Not the table does not load (403: Forbidden) 3 - Apply this patch 4 - Reload 5 - Success!
Created attachment 159874 [details] [review] Bug 35574: Bookings tab from biblio details should only require manage_bookings permission TO test: 1 - Find or create a staff user 2 - Grant permissions: circulate: manage_bookings, circ_remaining_permissions catalogue 3 - Open a record details, go to items tab, mark an item as bookable 4 - Sign out and sign in as the patron above (or use a private window to sign in) 5 - Place a booking on the record located above 6 - Success 7 - Try to view the bookings tab 8 - Fail, you don't have permission 9 - Apply patch 10 - Success! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 159875 [details] [review] Bug 35574:Correct api permission for listing biblio specific bookings To test: 1 - Follow above plan and apply only first patch 2 - Not the table does not load (403: Forbidden) 3 - Apply this patch 4 - Reload 5 - Success! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 159876 [details] [review] Bug 35574: Add unit tests for api change We add the corresponding unit tests for the biblio/bookings endpoint to ensure no regressions in the future. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 159877 [details] [review] Bug 35574: Bookings tab from biblio details should only require manage_bookings permission TO test: 1 - Find or create a staff user 2 - Grant permissions: circulate: manage_bookings, circ_remaining_permissions catalogue 3 - Open a record details, go to items tab, mark an item as bookable 4 - Sign out and sign in as the patron above (or use a private window to sign in) 5 - Place a booking on the record located above 6 - Success 7 - Try to view the bookings tab 8 - Fail, you don't have permission 9 - Apply patch 10 - Success! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 159878 [details] [review] Bug 35574: Correct api permission for listing biblio specific bookings To test: 1 - Follow above plan and apply only first patch 2 - Not the table does not load (403: Forbidden) 3 - Apply this patch 4 - Reload 5 - Success! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 159879 [details] [review] Bug 35574: Add unit tests for api change We add the corresponding unit tests for the biblio/bookings endpoint to ensure no regressions in the future. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 159880 [details] [review] Bug 35574: Don't show the link either This patch adds the check for permission to the biblio menu item too. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 159886 [details] [review] Bug 35574: Bookings tab from biblio details should only require manage_bookings permission TO test: 1 - Find or create a staff user 2 - Grant permissions: circulate: manage_bookings, circ_remaining_permissions catalogue 3 - Open a record details, go to items tab, mark an item as bookable 4 - Sign out and sign in as the patron above (or use a private window to sign in) 5 - Place a booking on the record located above 6 - Success 7 - Try to view the bookings tab 8 - Fail, you don't have permission 9 - Apply patch 10 - Success! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Current status: Signed Off
Created attachment 159887 [details] [review] Bug 35574: Correct api permission for listing biblio specific bookings To test: 1 - Follow above plan and apply only first patch 2 - Not the table does not load (403: Forbidden) 3 - Apply this patch 4 - Reload 5 - Success! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 159888 [details] [review] Bug 35574: Add unit tests for api change We add the corresponding unit tests for the biblio/bookings endpoint to ensure no regressions in the future. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 159889 [details] [review] Bug 35574: Don't show the link either This patch adds the check for permission to the biblio menu item too. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 159890 [details] [review] Bug 35574: Tidy Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 159896 [details] [review] Bug 35574: Bookings tab from biblio details should only require manage_bookings permission TO test: 1 - Find or create a staff user 2 - Grant permissions: circulate: manage_bookings, circ_remaining_permissions catalogue 3 - Open a record details, go to items tab, mark an item as bookable 4 - Sign out and sign in as the patron above (or use a private window to sign in) 5 - Place a booking on the record located above 6 - Success 7 - Try to view the bookings tab 8 - Fail, you don't have permission 9 - Apply patch 10 - Success! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 159897 [details] [review] Bug 35574: Correct api permission for listing biblio specific bookings To test: 1 - Follow above plan and apply only first patch 2 - Not the table does not load (403: Forbidden) 3 - Apply this patch 4 - Reload 5 - Success! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 159898 [details] [review] Bug 35574: Add unit tests for api change We add the corresponding unit tests for the biblio/bookings endpoint to ensure no regressions in the future. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 159899 [details] [review] Bug 35574: Don't show the link either This patch adds the check for permission to the biblio menu item too. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 159900 [details] [review] Bug 35574: Tidy Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Trivial fix. QA script happy. Lots of missing tests added. Yay!
Pushed for 24.05! Well done everyone, thank you!
Pushed to 23.11.x for 23.11.02
Missing dependencies for 23.05.x, no backport.