Bugzilla – Attachment 94905 Details for
Bug 22706
Add plugin hooks to allow custom password strength checking modules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22706: (RM follow-up) Remove use of Koha::Plugins::Handler
Bug-22706-RM-follow-up-Remove-use-of-KohaPluginsHa.patch (text/plain), 3.07 KB, created by
Martin Renvoize (ashimema)
on 2019-10-31 11:23:59 UTC
(
hide
)
Description:
Bug 22706: (RM follow-up) Remove use of Koha::Plugins::Handler
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-10-31 11:23:59 UTC
Size:
3.07 KB
patch
obsolete
>From dffa5d9ba8d16ee10794617dacb3c985c690775b Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 31 Oct 2019 10:11:07 +0000 >Subject: [PATCH] Bug 22706: (RM follow-up) Remove use of > Koha::Plugins::Handler > >Using both Koha::Plugins and Koha::Plugins::Handler inside the same >class causes issues for runtime module loading which in turn caused all >the plugins tests to fail. > >This patch converts this patchset to use the direct call style used >elsewhere in Koha removing the need for Koha::Plugins::Handler. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Patron.pm | 25 ++++++++++--------------- > 1 file changed, 10 insertions(+), 15 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 92580725db..2b079af390 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -44,7 +44,6 @@ use Koha::Patron::Images; > use Koha::Patron::Relationships; > use Koha::Patrons; > use Koha::Plugins; >-use Koha::Plugins::Handler; > use Koha::Subscription::Routinglists; > use Koha::Token; > use Koha::Virtualshelves; >@@ -237,14 +236,12 @@ sub store { > # This plugin hook will also be used by a plugin for the Norwegian national > # patron database. This is why we need to pass both the password and the > # borrowernumber to the plugin. >- my $ret = Koha::Plugins::Handler->run({ >- class => ref $plugin, >- method => 'check_password', >- params => { >+ my $ret = $plugin->check_password( >+ { > password => $self->plain_text_password, >- borrowernumber => $self->borrowernumber, >- }, >- }); >+ borrowernumber => $self->borrowernumber >+ } >+ ); > if ( $ret->{'error'} == 1 ) { > Koha::Exceptions::Password::Plugin->throw(); > } >@@ -754,14 +751,12 @@ sub set_password { > # This plugin hook will also be used by a plugin for the Norwegian national > # patron database. This is why we need to pass both the password and the > # borrowernumber to the plugin. >- my $ret = Koha::Plugins::Handler->run({ >- class => ref $plugin, >- method => 'check_password', >- params => { >+ my $ret = $plugin->check_password( >+ { > password => $password, >- borrowernumber => $self->borrowernumber, >- }, >- }); >+ borrowernumber => $self->borrowernumber >+ } >+ ); > # This plugin hook will also be used by a plugin for the Norwegian national > # patron database. This is why we need to call the actual plugins and then > # check skip_validation afterwards. >-- >2.20.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 22706
:
93488
|
93526
|
94613
|
94614
|
94672
|
94673
|
94674
|
94675
| 94905 |
94906
|
94907
|
94910