Item8049: wikinameToEmails() not resolved properly.

pencil
Priority: Urgent
Current State: Closed
Released In:
Target Release:
Applies To: Extension
Component: LdapContrib
Branches:
Reported By: Foswiki:Main.MichaelDaum
Waiting For:
Last Change By: MichaelDaum
The error is two-fold:

First, there is a plain error in the LdapContrib user mapper that did not consider the cases the wikinameToEmails() function is called with a login or a group name.

Second, nor did the standard mapper. However, the reason for its failure is in Foswiki::Users.pm as it tries to get the correct mapper for a given wikiname. It fails to use the correct mapper if Foswiki::Users::findUserByWikiName() is called with a login name.

Here's the patch. Please check:
--- lib/Foswiki/Users.pm        (revision 2063)
+++ lib/Foswiki/Users.pm        (working copy)
@@ -472,7 +472,7 @@

     # Trim the (pointless) userweb, if present
     $wn =~ s/^($Foswiki::cfg{UsersWebName}|%USERSWEB%|%MAINWEB%)\.//;
-    my $mapping = $this->_getMapping( undef, undef, $wn );
+    my $mapping = $this->_getMapping( $wn, $wn, $wn );
     return $mapping->findUserByWikiName($wn);
 }

-- MichaelDaum - 20 Jan 2009

Actually, instead of forcing login names to work on functions that take a wiki name - like findUserByWikiName() is wrong. And this never worked. As a consequence the Func docu needs to be changed only.

-- MichaelDaum - 20 Jan 2009

Released as LdapContrib v.2.99.11

-- MichaelDaum - 20 Jan 2009

ItemTemplate edit

Summary wikinameToEmails() not resolved properly.
ReportedBy Foswiki:Main.MichaelDaum
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component LdapContrib
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:d6267b64aa0f LdapContrib:0011342b3551
ReleasedIn
Topic revision: r4 - 20 Jan 2009, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy