Bugzilla – Attachment 18808 Details for
Bug 8993
LDAP authentication improvements: multiple branch and transformation modules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8993: Add branchcode and categorycode mappings for sample module
Bug-8993-Add-branchcode-and-categorycode-mappings-.patch (text/plain), 1.57 KB, created by
Julian Maurice
on 2013-06-10 07:45:32 UTC
(
hide
)
Description:
Bug 8993: Add branchcode and categorycode mappings for sample module
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2013-06-10 07:45:32 UTC
Size:
1.57 KB
patch
obsolete
>From 4e3bf430f0283b5749c8f198f2a806004c5a8ed7 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Mon, 10 Jun 2013 07:39:57 +0000 >Subject: [PATCH] Bug 8993: Add branchcode and categorycode mappings for sample module > >--- > C4/LDAPTransform/RepeatableValues.pm | 26 ++++++++++++++------------ > 1 files changed, 14 insertions(+), 12 deletions(-) > >diff --git a/C4/LDAPTransform/RepeatableValues.pm b/C4/LDAPTransform/RepeatableValues.pm >index 4608559..0c65156 100644 >--- a/C4/LDAPTransform/RepeatableValues.pm >+++ b/C4/LDAPTransform/RepeatableValues.pm >@@ -4,24 +4,26 @@ use warnings; > use strict; > > my $mapping = { qw/ >-givenName firstname >-sn surname >-uid userid >-mail email >+ givenName firstname >+ sn surname >+ uid userid >+ mail email >+ categorycode categorycode >+ branchcode branchcode > / }; > > sub get_borrower { >- my $ldap_entry = shift; >- $ldap_entry->isa('Net::LDAP::Entry') or die "argument to transform get_borrower is not Net::LDAP::Entry"; >+ my $ldap_entry = shift; >+ $ldap_entry->isa('Net::LDAP::Entry') or die "argument to transform get_borrower is not Net::LDAP::Entry"; > >- my $user = { column => {} }; >+ my $user = { column => {} }; > >- while (my ($from, $to) = each %$mapping) { >- my @vals = $ldap_entry->get_value( $from ); >- $user->{column}->{$to} = $vals[0]; >- } >+ while (my ($from, $to) = each %$mapping) { >+ my @vals = $ldap_entry->get_value( $from ); >+ $user->{column}->{$to} = $vals[0]; >+ } > >- return $user; >+ return $user; > } > > 1; >-- >1.7.2.5
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 8993
:
13129
|
13130
|
13131
|
13132
|
14219
|
14460
|
14461
|
16659
|
16796
|
18804
|
18805
|
18806
|
18807
|
18808
|
21345
|
21346
|
21347
|
21348
|
21349
|
22580
|
22581
|
22582
|
22583
|
22584
|
22588
|
22589
|
22590
|
22591
|
22592
|
38270
|
38271
|
38273
|
38274