Bugzilla – Attachment 49790 Details for
Bug 11807
Add categorycode conversions to LDAP authentication.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11807: (follow-up) remove date conversions
Bug-11807-follow-up-remove-date-conversions.patch (text/plain), 2.23 KB, created by
Martin Renvoize (ashimema)
on 2016-04-01 14:10:52 UTC
(
hide
)
Description:
Bug 11807: (follow-up) remove date conversions
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2016-04-01 14:10:52 UTC
Size:
2.23 KB
patch
obsolete
>From b15bd5ebdfb2626a77f36ddb0e54570c0e570f5f Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <j.kylmala@gmail.com> >Date: Mon, 31 Aug 2015 09:41:34 +0000 >Subject: [PATCH] Bug 11807: (follow-up) remove date conversions > >To test > >1/ Apply both patches > >2/ This patch lets you easily configure mappings for categorycode values. >These mapping will be used when updating the user's account after a successful LDAP login. > >Here is an example configuration : > ><config> > <ldapserver id="ldapserver> > <mapping> > <categorycode is="usertype">STU</categorycode> > ... > </mapping> > > <categorycode_mapping> > <categorycode value="STU">STUDENT</categorycode> > <categorycode value="EMP">EMPLOYEE</categorycode> > </categorycode_mapping> > </ldapserver> ></config> > >3/ With this configuration, LDAP users with the usertype value "EMP" on the LDAP server should have the "EMPLOYEE" categorycode in Koha. > >Signed-off-by: Chris <chris@bigballofwax.co.nz> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Auth_with_ldap.pm | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > >diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm >index 324783a..c50df76 100644 >--- a/C4/Auth_with_ldap.pm >+++ b/C4/Auth_with_ldap.pm >@@ -27,7 +27,6 @@ use C4::Members qw(AddMember changepassword); > use C4::Members::Attributes; > use C4::Members::AttributeTypes; > use C4::Members::Messaging; >-use C4::Dates; > use C4::Auth qw(checkpw_internal); > use Koha::AuthUtils qw(hash_password); > use List::MoreUtils qw( any ); >@@ -266,11 +265,7 @@ sub ldap_entry_2_hash { > . substr($borrower{ 'surname' },0,1) > . " "); > >- # Date and categorycode conversions >- $borrower{'dateexpiry'} = C4::Dates->new($borrower{'dateexpiry'},'sql')->output('iso') if $borrower{'dateexpiry'}; >- $borrower{'dateofbirth'} = C4::Dates->new($borrower{'dateofbirth'},'sql')->output('iso') if $borrower{'dateofbirth'}; >- $borrower{'dateenrolled'} = C4::Dates->new($borrower{'dateenrolled'},'sql')->output('iso') if $borrower{'dateenrolled'}; >- >+ # categorycode conversions > if(defined $categorycode_conversions{$borrower{categorycode}}) { > $borrower{categorycode} = $categorycode_conversions{$borrower{categorycode}}; > } >-- >2.1.4
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 11807
:
25526
|
42105
|
46182
|
46183
|
49789
| 49790