Bugzilla – Attachment 126814 Details for
Bug 29272
API not respecting $category->effective_change_password
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29272: (QA follow-up) Category setup overrides syspref
Bug-29272-QA-follow-up-Category-setup-overrides-sy.patch (text/plain), 1.88 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-10-24 22:56:26 UTC
(
hide
)
Description:
Bug 29272: (QA follow-up) Category setup overrides syspref
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-10-24 22:56:26 UTC
Size:
1.88 KB
patch
obsolete
>From dd891c522b7424168675c8bca36a826235c1ebbe Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Sun, 24 Oct 2021 19:54:24 -0300 >Subject: [PATCH] Bug 29272: (QA follow-up) Category setup overrides syspref > >This patch removes an early short-circuit we had, which wasn't correct >regarding the OpacPasswordChange syspref. If a patron category is >allowed to change password, it overrides the syspref. > >To test: >1. Tests still pass. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/REST/V1/Patrons/Password.pm | 8 -------- > t/db_dependent/api/v1/patrons_password.t | 3 +-- > 2 files changed, 1 insertion(+), 10 deletions(-) > >diff --git a/Koha/REST/V1/Patrons/Password.pm b/Koha/REST/V1/Patrons/Password.pm >index 5aaaa6b659..35379edf18 100644 >--- a/Koha/REST/V1/Patrons/Password.pm >+++ b/Koha/REST/V1/Patrons/Password.pm >@@ -90,14 +90,6 @@ sub set_public { > my $body = $c->validation->param('body'); > my $patron_id = $c->validation->param('patron_id'); > >- # short-circuit early >- unless ( C4::Context->preference('OpacPasswordChange') ) { >- return $c->render( >- status => 403, >- openapi => { error => "Configuration prevents password changes by unprivileged users" } >- ); >- } >- > my $user = $c->stash('koha.user'); > > unless ( $user->borrowernumber == $patron_id ) { >diff --git a/t/db_dependent/api/v1/patrons_password.t b/t/db_dependent/api/v1/patrons_password.t >index 95f8e5fca9..8f79a4b81b 100755 >--- a/t/db_dependent/api/v1/patrons_password.t >+++ b/t/db_dependent/api/v1/patrons_password.t >@@ -158,8 +158,7 @@ subtest 'set_public() (unprivileged user tests)' => sub { > } > )->status_is(403)->json_is( > { >- error => >- 'Configuration prevents password changes by unprivileged users' >+ error => 'Changing password is forbidden' > } > ); > >-- >2.33.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 29272
:
126501
|
126502
|
126632
|
126633
|
126814
|
126976
|
126977
|
126978