Bugzilla – Attachment 30376 Details for
Bug 12026
Shibboleth auto-provisioning - Create
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
BUG 12026, Follow up: Added Documentation
BUG-12026-Follow-up-Added-Documentation.patch (text/plain), 2.92 KB, created by
Martin Renvoize (ashimema)
on 2014-07-31 06:37:46 UTC
(
hide
)
Description:
BUG 12026, Follow up: Added Documentation
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2014-07-31 06:37:46 UTC
Size:
2.92 KB
patch
obsolete
>From 7b66768727f282552d916c2c60942a4e5de32c36 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 30 Jul 2014 14:53:27 +0000 >Subject: [PATCH] BUG 12026, Follow up: Added Documentation > >BUG 12026, Follow up: Updated to work with match point selection > >- The base bug that this patch enhances has added the ability to choose > your match point in the configuration file. This patch adds code to > take that change into account. >--- > C4/Auth_with_shibboleth.pm | 28 ++++++++++++++++++---------- > 1 file changed, 18 insertions(+), 10 deletions(-) > >diff --git a/C4/Auth_with_shibboleth.pm b/C4/Auth_with_shibboleth.pm >index fd95f90..a1471db 100644 >--- a/C4/Auth_with_shibboleth.pm >+++ b/C4/Auth_with_shibboleth.pm >@@ -83,13 +83,13 @@ sub get_login_shib { > sub checkpw_shib { > $debug and warn "checkpw_shib"; > >- my ( $dbh, $userid ) = @_; >- my $retnumber; >- $debug and warn "User Shibboleth-authenticated as: $userid"; >+ my ( $dbh, $match ) = @_; >+ my ( $retnumber, $userid ); >+ $debug and warn "User Shibboleth-authenticated as: $match"; > >- # Does the given shibboleth attribute value ($userid) match a valid koha user ? >+ # Does the given shibboleth attribute value ($match) match a valid koha user ? > my $sth = $dbh->prepare("select cardnumber, userid from borrowers where $shibbolethMatchField=?"); >- $sth->execute($userid); >+ $sth->execute($match); > if ( $sth->rows ) { > my @retvals = $sth->fetchrow; > $retnumber = $retvals[1]; >@@ -97,19 +97,19 @@ sub checkpw_shib { > return ( 1, $retnumber, $userid ); > } > >+ # If we reach this point, the user is not yet a valid koha user > if ( $shib->{'autocreate'} ) { >- return _autocreate( $dbh, $shib, $userid ); >+ return _autocreate( $dbh, $shib, $match ); > } else { >- # If we reach this point, the user is not a valid koha user >- $debug and warn "User $userid is not a valid Koha user"; >+ $debug and warn "User $match is not a valid Koha user"; > return 0; > } > } > > sub _autocreate { >- my ( $dbh, $shib, $userid ) = @_; >+ my ( $dbh, $shib, $match ) = @_; > >- my %borrower = ( userid => $userid ); >+ my %borrower = ( $shibbolethMatchField => $match ); > > while ( my ( $key, $entry ) = each %{$shib->{'mapping'}} ) { > $borrower{$key} = ( $entry->{'is'} && $ENV{ $entry->{'is'} } ) || $entry->{'content'} || ''; >@@ -238,6 +238,14 @@ Given a database handle and a shib_login attribute, this routine checks for a ma > > my ( $retval, $retcard, $retuserid ) = C4::Auth_with_shibboleth::checkpw_shib( $dbh, $shib_login ); > >+=head2 _autocreate >+ >+ my ( $retval, $retcard, $retuserid ) = _autocreate( $dbh, $shib, $userid ); >+ >+Given a database handle, a shibboleth attribute reference and a userid this internal routine will add the given user to koha and return their user credentials >+ >+This routine is NOT exported >+ > =head1 SEE ALSO > > =cut >-- >1.7.10.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 12026
:
26769
|
26788
|
28408
|
30351
|
30352
|
30376
|
31054
|
31055
|
35551
|
35552
|
56241
|
56242
|
56243
|
57486
|
57563
|
57564
|
57565
|
57566
|
61268
|
61269
|
61270
|
61271
|
61363
|
61364
|
61365
|
61366
|
61367
|
61435
|
61436
|
61437
|
61438
|
61444
|
61445
|
61446
|
61447
|
61448
|
61449
|
61521
|
61522
|
61523
|
61524
|
61525
|
61526
|
61527
|
61596
|
61598
|
61599
|
61675
|
61676
|
61677
|
61678
|
61679
|
61680
|
61683
|
61684
|
62521
|
62522