Bugzilla – Attachment 109526 Details for
Bug 23816
Allow to have different password strength and length settings for different patron categories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23816: trivial code simplification
Bug-23816-trivial-code-simplification.patch (text/plain), 2.64 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-09-02 12:55:08 UTC
(
hide
)
Description:
Bug 23816: trivial code simplification
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-09-02 12:55:08 UTC
Size:
2.64 KB
patch
obsolete
>From cc7b73e2dbffb98d9963a69aa1be0da07c4956d6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 19 Aug 2020 09:00:12 +0200 >Subject: [PATCH] Bug 23816: trivial code simplification > >Ease readability > >Signed-off-by: Agustin Moyano <agustinmoyano@theke.io> > >https://bugs.koha-community.org/show_bug.cgi?id=23826 > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Patron/Category.pm | 20 ++++++-------------- > 1 file changed, 6 insertions(+), 14 deletions(-) > >diff --git a/Koha/Patron/Category.pm b/Koha/Patron/Category.pm >index 346a5d9778..7a4541ebc4 100644 >--- a/Koha/Patron/Category.pm >+++ b/Koha/Patron/Category.pm >@@ -235,9 +235,7 @@ or, if undef, falls back to the OpacResetPassword system preference. > sub effective_reset_password { > my ($self) = @_; > >- return ( defined $self->reset_password ) >- ? $self->reset_password >- : C4::Context->preference('OpacResetPassword'); >+ return $self->reset_password // C4::Context->preference('OpacResetPassword'); > } > > =head3 effective_change_password >@@ -250,41 +248,35 @@ or, if undef, falls back to the OpacPasswordChange system preference. > sub effective_change_password { > my ($self) = @_; > >- return ( defined $self->change_password ) >- ? $self->change_password >- : C4::Context->preference('OpacPasswordChange'); >+ return $self->change_password // C4::Context->preference('OpacPasswordChange'); > } > > =head3 effective_min_password_length > > $category->effective_min_password_length() > >-Retrieve category's password length if setted, or minPasswordLength otherwise >+Retrieve category's password length if set, or minPasswordLength otherwise > > =cut > > sub effective_min_password_length { > my ($self) = @_; > >- return C4::Context->preference('minPasswordLength') unless defined $self->min_password_length; >- >- return $self->min_password_length; >+ return $self->min_password_length // C4::Context->preference('minPasswordLength'); > } > > =head3 effective_require_strong_password > > $category->effective_require_strong_password() > >-Retrieve category's password strength if setted, or RequireStrongPassword otherwise >+Retrieve category's password strength if set, or RequireStrongPassword otherwise > > =cut > > sub effective_require_strong_password { > my ($self) = @_; > >- return C4::Context->preference('RequireStrongPassword') unless defined $self->require_strong_password; >- >- return $self->require_strong_password; >+ return $self->require_strong_password // C4::Context->preference('RequireStrongPassword'); > } > > =head3 override_hidden_items >-- >2.28.0
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 23816
:
103099
|
103100
|
103101
|
103102
|
103103
|
103104
|
103108
|
103109
|
103110
|
103111
|
103112
|
103113
|
103805
|
103806
|
103807
|
103808
|
103809
|
103810
|
107158
|
107159
|
107160
|
107161
|
107162
|
107163
|
108554
|
108555
|
108556
|
108557
|
108558
|
108559
|
108571
|
108572
|
109243
|
109244
|
109245
|
109249
|
109250
|
109251
|
109252
|
109253
|
109254
|
109255
|
109256
|
109257
|
109520
|
109521
|
109522
|
109523
|
109524
|
109525
| 109526 |
109527
|
109528
|
109833
|
109834