Koha-clms/serials
Baptiste Wojtkowski 7298dc064f
Bug 34971: Fix permission to close a serial subscription (edit)
Note: there is a minor bug I had to correct, I don't split into two
patches since it is very minor and necessary to test that one.

Patch 1 - (this one) When a user is on serial collection information, the subscription is
not passed to the template, and therefore not passed to serials-toolbar.inc.
This makes sense if collection information is called with a biblionumber
but not if collection information is called with a subscription id.
Consequently, subscription.closed is always false and it is not possible
to reopen a basket.

Patch 2 - User with incorrect permission can close serials, they just
need to access to the page. This is due to serials-toolbar.inc expecting
a variable named "cannotedit", which is provided by
"subscription-details.pl" and not by "serials-collection.pl"

TEST PLAN:
Before applying patches :
1 - log in as a user with only receive_serial permission
2 - Open two pages one on
  /serials-collection.pl?subscriptionid=ID_A, another on
  /serials-collection.pl?subscriptionid=ID_B
3 - On serial A's collection page, check you can close the serial (wrong
  behaviour), note you can close it again but not reopen it
4 - Apply first patch
5 - Check you can reopen the serial (wrong behaviour) keep the page open
6 - On serial B's collection page, close the serial, keep the page open
7 - Apply second patch
8 - On page left open on 3 -, click on close, you are redirected to a
  login page.
8 - Go back to serial A's collection page -> there is no close button
  anymore
9 - On page left open on 4 -, click on reopen, you are redirected to a
  login page
10 - Go back to serial B's collection page -> there is no close button
  anymore

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-12 15:28:16 +01:00
..
acqui-search-result.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
acqui-search.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
checkexpiration.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
claims.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
create-numberpattern.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
lateissues-export.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
reorder_members.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
routing-preview.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
routing.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
serials-collection.pl Bug 34971: Fix permission to close a serial subscription (edit) 2025-02-12 15:28:16 +01:00
serials-edit.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
serials-home.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
serials-search.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
showpredictionpattern.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
subscription-add.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
subscription-batchedit.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
subscription-bib-search.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
subscription-detail.pl Bug 34971: Fix permission to close a serial subscription (edit) 2025-02-12 15:28:16 +01:00
subscription-frequencies.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
subscription-frequency.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
subscription-history.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
subscription-numberpattern.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
subscription-numberpatterns.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
subscription-renew.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
viewalerts.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00