Bug 23584 - Add public API routes to change privacy settings
Summary: Add public API routes to change privacy settings
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: Main
Hardware: All All
: P5 - low new feature (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Josef Moravec
URL: https://wiki.koha-community.org/wiki/...
Keywords:
Depends on: 20691
Blocks: 23623
  Show dependency treegraph
 
Reported: 2019-09-10 19:19 UTC by Tomás Cohen Arazi
Modified: 2021-06-14 21:29 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00


Attachments
Bug 23584: Add spec for PUT /public/patron/:patron_id/guarantors (12.03 KB, patch)
2019-09-16 18:10 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 23584: Add the controller method and tests (7.45 KB, patch)
2019-09-16 18:10 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 23584: Add the controller method and tests (7.48 KB, patch)
2019-09-16 18:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 23584: Add spec for PUT /public/patron/:patron_id/guarantors (12.09 KB, patch)
2019-09-17 18:47 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 23584: Add the controller method and tests (7.54 KB, patch)
2019-09-17 18:47 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 23584: Add spec for PUT /public/patron/:patron_id/guarantors (12.14 KB, patch)
2019-09-19 19:32 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 23584: Add the controller method and tests (7.59 KB, patch)
2019-09-19 19:32 UTC, Liz Rea
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2019-09-10 19:19:42 UTC
They would substitute the following svc CGI scripts:
- show_checkouts_to_relatives
- show_fines_to_relatives
Comment 1 Tomás Cohen Arazi 2019-09-16 18:10:30 UTC
Created attachment 92838 [details] [review]
Bug 23584: Add spec for PUT /public/patron/:patron_id/guarantors

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Tomás Cohen Arazi 2019-09-16 18:10:34 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi 2019-09-16 18:50:38 UTC
Created attachment 92840 [details] [review]
Bug 23584: Add the controller method and tests

This patchset adds endpoints for the patrons to change their privacy
settings regarding their guarantors.

The following endpoints are added:

  PUT /public/patrons/:patron_id/guarantors/can_see_charges
  PUT /public/patrons/:patron_id/guarantors/can_see_checkouts

They can only be used by the patron themselves with valid sessions. And
enforce the AllowPatronToSetCheckoutsVisibilityForGuarantor and
AllowPatronToSetFinesVisibilityForGuarantor system preferences when
required.

All this is covered by unit tests.

To test:
1) Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Josef Moravec 2019-09-17 18:47:21 UTC
Created attachment 92911 [details] [review]
Bug 23584: Add spec for PUT /public/patron/:patron_id/guarantors

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Josef Moravec 2019-09-17 18:47:26 UTC
Created attachment 92912 [details] [review]
Bug 23584: Add the controller method and tests

This patchset adds endpoints for the patrons to change their privacy
settings regarding their guarantors.

The following endpoints are added:

  PUT /public/patrons/:patron_id/guarantors/can_see_charges
  PUT /public/patrons/:patron_id/guarantors/can_see_checkouts

They can only be used by the patron themselves with valid sessions. And
enforce the AllowPatronToSetCheckoutsVisibilityForGuarantor and
AllowPatronToSetFinesVisibilityForGuarantor system preferences when
required.

All this is covered by unit tests.

To test:
1) Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 6 Liz Rea 2019-09-19 19:32:19 UTC
Created attachment 92990 [details] [review]
Bug 23584: Add spec for PUT /public/patron/:patron_id/guarantors

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 7 Liz Rea 2019-09-19 19:32:31 UTC
Created attachment 92991 [details] [review]
Bug 23584: Add the controller method and tests

This patchset adds endpoints for the patrons to change their privacy
settings regarding their guarantors.

The following endpoints are added:

  PUT /public/patrons/:patron_id/guarantors/can_see_charges
  PUT /public/patrons/:patron_id/guarantors/can_see_checkouts

They can only be used by the patron themselves with valid sessions. And
enforce the AllowPatronToSetCheckoutsVisibilityForGuarantor and
AllowPatronToSetFinesVisibilityForGuarantor system preferences when
required.

All this is covered by unit tests.

To test:
1) Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 8 Martin Renvoize 2019-09-23 10:10:03 UTC
Nice work!

Pushed to master for 19.11.00