Bug 22849 - Data shared without agreement
Summary: Data shared without agreement
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: master
Hardware: All All
: P5 - low blocker (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 17047
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-04 16:20 UTC by Jonathan Druart
Modified: 2019-05-24 13:28 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.05.00


Attachments
Bug 22849: Do not share data (Mana) without agreement (1.75 KB, patch)
2019-05-04 16:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 22849: Do not share data (Mana) without agreement (2.12 KB, patch)
2019-05-04 16:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 22849: Do not share data (Mana) without agreement (2.16 KB, patch)
2019-05-11 02:05 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22849: Do not share data (Mana) without agreement (2.22 KB, patch)
2019-05-13 19:52 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2019-05-04 16:20:56 UTC
From 17047 comment 456:

A couple of things wrong in serials/subscription-add.pl

1.
447     if ( defined( $query->param('mana_id') ) ) {

It's always defined, you wanted to test with ""

2. 
375     if ( (C4::Context->preference('Mana')) and ( grep { $_ eq "subscription" } split(/,/, C4::Context->preference('AutoShareWithMana'))) ){

Mana == 2 == let me think about it
=> I am not expecting to reach Koha::SharedContent in that case

So we are sharing data whereas the library did not decide yet!
Comment 1 Jonathan Druart 2019-05-04 16:37:17 UTC
Created attachment 89354 [details] [review]
Bug 22849: Do not share data (Mana) without agreement

A couple of things wrong in serials/subscription-add.pl

1.
447     if ( defined( $query->param('mana_id') ) ) {

It's always defined, you wanted to test with ""

2.
375     if ( (C4::Context->preference('Mana')) and ( grep { $_ eq "subscription" } split(/,/, C4::Context->preference('AutoShareWithMana'))) ){

Mana == 2 == let me think about it
=> I am not expecting to reach Koha::SharedContent in that case

So we are sharing data whereas the library did not decide yet!

Test plan:
You need to be familiar you Mana to test this patch.

JD: I did not test this patch
Comment 2 Jonathan Druart 2019-05-04 16:43:43 UTC
Created attachment 89355 [details] [review]
Bug 22849: Do not share data (Mana) without agreement

A couple of things wrong in serials/subscription-add.pl

1.
447     if ( defined( $query->param('mana_id') ) ) {

It's always defined, you wanted to test with ""

2.
375     if ( (C4::Context->preference('Mana')) and ( grep { $_ eq "subscription" } split(/,/, C4::Context->preference('AutoShareWithMana'))) ){

Mana == 2 == let me think about it
=> I am not expecting to reach Koha::SharedContent in that case

So we are sharing data whereas the library did not decide yet!

Test plan:
You need to be familiar you Mana to test this patch.

JD: I did not test this patch
Comment 3 Liz Rea 2019-05-11 02:05:37 UTC
Created attachment 89577 [details] [review]
Bug 22849: Do not share data (Mana) without agreement

A couple of things wrong in serials/subscription-add.pl

1.
447     if ( defined( $query->param('mana_id') ) ) {

It's always defined, you wanted to test with ""

2.
375     if ( (C4::Context->preference('Mana')) and ( grep { $_ eq "subscription" } split(/,/, C4::Context->preference('AutoShareWithMana'))) ){

Mana == 2 == let me think about it
=> I am not expecting to reach Koha::SharedContent in that case

So we are sharing data whereas the library did not decide yet!

Test plan:
You need to be familiar you Mana to test this patch.

JD: I did not test this patch

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Tested this, adding subscription still works, mana seems not to be queried. tested on top of 22812.
Comment 4 Katrin Fischer 2019-05-13 19:52:39 UTC
Created attachment 89689 [details] [review]
Bug 22849: Do not share data (Mana) without agreement

A couple of things wrong in serials/subscription-add.pl

1.
447     if ( defined( $query->param('mana_id') ) ) {

It's always defined, you wanted to test with ""

2.
375     if ( (C4::Context->preference('Mana')) and ( grep { $_ eq "subscription" } split(/,/, C4::Context->preference('AutoShareWithMana'))) ){

Mana == 2 == let me think about it
=> I am not expecting to reach Koha::SharedContent in that case

So we are sharing data whereas the library did not decide yet!

Test plan:
You need to be familiar you Mana to test this patch.

JD: I did not test this patch

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Nick Clemens 2019-05-14 18:22:09 UTC
Awesome work all!

Pushed to master for 19.05
Comment 6 Martin Renvoize 2019-05-24 13:28:30 UTC
Bug with enhancement not in 18.11.x series.