Bugzilla – Attachment 38274 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]
[DO NOT PUSH] Bug 8993: Sample LDAP transformation module
DO-NOT-PUSH-Bug-8993-Sample-LDAP-transformation-mo.patch (text/plain), 1.26 KB, created by
Julian Maurice
on 2015-04-21 15:02:03 UTC
(
hide
)
Description:
[DO NOT PUSH] Bug 8993: Sample LDAP transformation module
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2015-04-21 15:02:03 UTC
Size:
1.26 KB
patch
obsolete
>From ebe45217c311d5db516c8b39e36985c216ee7909 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 21 Apr 2015 16:47:41 +0200 >Subject: [PATCH] [DO NOT PUSH] Bug 8993: Sample LDAP transformation module > >--- > C4/LDAPTransform/RepeatableValues.pm | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > create mode 100644 C4/LDAPTransform/RepeatableValues.pm > >diff --git a/C4/LDAPTransform/RepeatableValues.pm b/C4/LDAPTransform/RepeatableValues.pm >new file mode 100644 >index 0000000..0c65156 >--- /dev/null >+++ b/C4/LDAPTransform/RepeatableValues.pm >@@ -0,0 +1,29 @@ >+package C4::LDAPTransform::RepeatableValues; >+ >+use warnings; >+use strict; >+ >+my $mapping = { qw/ >+ 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 $user = { column => {} }; >+ >+ while (my ($from, $to) = each %$mapping) { >+ my @vals = $ldap_entry->get_value( $from ); >+ $user->{column}->{$to} = $vals[0]; >+ } >+ >+ return $user; >+} >+ >+1; >-- >1.9.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 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