Bugzilla – Attachment 165466 Details for
Bug 36503
Add a plugin hook to modify patrons after authentication
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36503: (follow-up) Move the plugin hook to include the domain
Bug-36503-follow-up-Move-the-plugin-hook-to-includ.patch (text/plain), 1.78 KB, created by
Raphael Straub
on 2024-04-24 14:31:58 UTC
(
hide
)
Description:
Bug 36503: (follow-up) Move the plugin hook to include the domain
Filename:
MIME Type:
Creator:
Raphael Straub
Created:
2024-04-24 14:31:58 UTC
Size:
1.78 KB
patch
obsolete
>From 1da60e2124a7f70af260e513aba3d603c923c7d9 Mon Sep 17 00:00:00 2001 >From: Raphael Straub <raphael.straub@kit.edu> >Date: Wed, 24 Apr 2024 13:48:37 +0000 >Subject: [PATCH] Bug 36503: (follow-up) Move the plugin hook to include the > domain > >This allows the plugin to read/change the domain. > >Sponsored-by: Karlsruhe Institute of Technology (KIT) >--- > Koha/Auth/Client.pm | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/Koha/Auth/Client.pm b/Koha/Auth/Client.pm >index 7e9d69e640..d51f400bba 100644 >--- a/Koha/Auth/Client.pm >+++ b/Koha/Auth/Client.pm >@@ -64,6 +64,10 @@ sub get_user { > > my ( $mapped_data, $patron ) = $self->_get_data_and_patron({ provider => $provider, data => $data, config => $config }); > >+ $mapped_data //= {}; >+ >+ my $domain = $self->has_valid_domain_config({ provider => $provider, email => $mapped_data->{email}, interface => $interface}); >+ > # Call the plugin hook "auth_client_get_user" of all plugins in > # ascending priority. > if ( C4::Context->config('enable_plugins') ) { >@@ -79,18 +83,16 @@ sub get_user { > config => $config, > mapped_data => $mapped_data, > patron => $patron, >+ domain => $domain, > }; > foreach my $plugin (@plugins) { > $plugin->auth_client_get_user($args); > } > $mapped_data = $args->{'mapped_data'}; > $patron = $args->{'patron'}; >+ $domain = $args->{'domain'}; > } > >- $mapped_data //= {}; >- >- my $domain = $self->has_valid_domain_config({ provider => $provider, email => $mapped_data->{email}, interface => $interface}); >- > $patron->set($mapped_data)->store if $patron && $domain->update_on_auth; > > $mapped_data->{categorycode} = $domain->default_category_id; >-- >2.30.2
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 36503
:
164379
|
164628
|
164893
|
164894
|
165466
|
166050
|
166111
|
166112
|
166113
|
166114
|
166115
|
166116
|
166458
|
166459
|
166460
|
166461
|
166462
|
166531
|
166532