Bugzilla – Attachment 133805 Details for
Bug 29924
Introduce password expiration to patron categories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29924: (follow-up) Add password_expiration_date to API
Bug-29924-follow-up-Add-passwordexpirationdate-to-.patch (text/plain), 3.83 KB, created by
Tomás Cohen Arazi
on 2022-04-25 14:31:17 UTC
(
hide
)
Description:
Bug 29924: (follow-up) Add password_expiration_date to API
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2022-04-25 14:31:17 UTC
Size:
3.83 KB
patch
obsolete
>From fae54f1b947ad6c165e0f27b307a26eddecf5ff9 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 11 Feb 2022 13:34:37 +0000 >Subject: [PATCH] Bug 29924: (follow-up) Add password_expiration_date to API > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > api/v1/swagger/definitions/patron.yaml | 7 +++++++ > api/v1/swagger/paths/patrons.yaml | 5 +++++ > t/db_dependent/api/v1/patrons.t | 5 +++++ > 3 files changed, 17 insertions(+) > >diff --git a/api/v1/swagger/definitions/patron.yaml b/api/v1/swagger/definitions/patron.yaml >index 256430ae6c8..6cad2ec85e4 100644 >--- a/api/v1/swagger/definitions/patron.yaml >+++ b/api/v1/swagger/definitions/patron.yaml >@@ -359,6 +359,13 @@ properties: > - number > - "null" > description: Balance of the patron's account >+ password_expiration_date: >+ type: >+ - string >+ - "null" >+ format: date >+ readOnly: true >+ description: day a patron's password expires and must be changed/reset > additionalProperties: false > required: > - surname >diff --git a/api/v1/swagger/paths/patrons.yaml b/api/v1/swagger/paths/patrons.yaml >index 5164cb2858d..43fc8fa6359 100644 >--- a/api/v1/swagger/paths/patrons.yaml >+++ b/api/v1/swagger/paths/patrons.yaml >@@ -189,6 +189,11 @@ > description: Case insensitive search on expiry_date > required: false > type: string >+ - name: password_expiration_date >+ in: query >+ description: Case insensitive search on password_expiration_date >+ required: false >+ type: string > - name: incorrect_address > in: query > description: Search on incorrect_address >diff --git a/t/db_dependent/api/v1/patrons.t b/t/db_dependent/api/v1/patrons.t >index 3d23b60372a..ebcd83a0d5c 100755 >--- a/t/db_dependent/api/v1/patrons.t >+++ b/t/db_dependent/api/v1/patrons.t >@@ -342,6 +342,7 @@ subtest 'add() tests' => sub { > delete $newpatron->{patron_id}; > delete $newpatron->{restricted}; > delete $newpatron->{anonymized}; >+ delete $newpatron->{password_expiration_date}; > > # Create a library just to make sure its ID doesn't exist on the DB > my $library_to_delete = $builder->build_object({ class => 'Koha::Libraries' }); >@@ -395,6 +396,7 @@ subtest 'add() tests' => sub { > delete $newpatron->{patron_id}; > delete $newpatron->{restricted}; > delete $newpatron->{anonymized}; >+ delete $newpatron->{password_expiration_date}; > $patron_to_delete->delete; > > # Set a date field >@@ -620,6 +622,7 @@ subtest 'update() tests' => sub { > delete $newpatron->{patron_id}; > delete $newpatron->{restricted}; > delete $newpatron->{anonymized}; >+ delete $newpatron->{password_expiration_date}; > > $t->put_ok("//$userid:$password@/api/v1/patrons/-1" => json => $newpatron) > ->status_is(404) >@@ -698,6 +701,7 @@ subtest 'update() tests' => sub { > $newpatron->{patron_id} = $unauthorized_patron->to_api->{patron_id}; > $newpatron->{restricted} = $unauthorized_patron->to_api->{restricted}; > $newpatron->{anonymized} = $unauthorized_patron->to_api->{anonymized}; >+ $newpatron->{password_expiration_date} = $unauthorized_patron->to_api->{password_expiration_date}; > > my $got = $result->tx->res->json; > my $updated_on_got = delete $got->{updated_on}; >@@ -729,6 +733,7 @@ subtest 'update() tests' => sub { > delete $newpatron->{patron_id}; > delete $newpatron->{restricted}; > delete $newpatron->{anonymized}; >+ delete $newpatron->{password_expiration_date}; > > # attempt to update > $authorized_patron->flags( 2**4 )->store; # borrowers flag = 4 >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29924
:
129705
|
129706
|
129707
|
129708
|
129762
|
129763
|
129764
|
129765
|
129766
|
129823
|
129953
|
129954
|
129955
|
129956
|
129957
|
130116
|
130117
|
130118
|
130119
|
130120
|
130495
|
130500
|
130501
|
130502
|
130503
|
130504
|
130505
|
130557
|
130558
|
130559
|
130560
|
130561
|
130562
|
130563
|
130677
|
130678
|
130679
|
130680
|
130681
|
130682
|
130683
|
131128
|
132059
|
132060
|
132061
|
132062
|
132063
|
132064
|
132065
|
132066
|
132084
|
132085
|
132086
|
132087
|
132088
|
132089
|
132090
|
132091
|
132092
|
133741
|
133742
|
133743
|
133744
|
133745
|
133746
|
133747
|
133748
|
133801
|
133802
|
133803
|
133804
| 133805 |
133806
|
133807
|
133808
|
133809
|
133810
|
133989
|
134758