Skip to content

Commit

Permalink
Item13155: fixed clash resolution
Browse files Browse the repository at this point in the history
still was depending on DNs in some cases
  • Loading branch information
MichaelDaum committed Dec 16, 2014
1 parent 733fae7 commit 0fc7aea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion data/System/LdapContrib.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="" date="1416819237" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" comment="" date="1418736507" format="1.1" version="1"}%
---+!! %TOPIC%
%TOC%
---++ Introduction
Expand Down Expand Up @@ -509,6 +509,7 @@ This work was partly sponsored by
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 16 Dec 2014: | fixed clash resolution (still was depending on DNs in some cases) |
| 24 Nov 2014: | fixed creation of cache.db on <nop>FreeBSD |
| 23 May 2014: | implemented feature to provide a login-to-wikiname mapping in a topic |
| 18 Mar 2014: | using proper locking when updating the ldap cache (Foswiki:Main/TerjeNessAndersen); \
Expand Down
12 changes: 6 additions & 6 deletions lib/Foswiki/Contrib/LdapContrib.pm
Expand Up @@ -30,8 +30,8 @@ use Encode ();
use Foswiki::Func ();
use Foswiki::Plugins ();

our $VERSION = '6.11';
our $RELEASE = '6.11';
our $VERSION = '6.20';
our $RELEASE = '6.20';
our %sharedLdapContrib;

=pod
Expand Down Expand Up @@ -1332,16 +1332,16 @@ sub cacheUserFromEntry {
}

if (defined $wikiName) {
#writeDebug("found explicit wikiName '$wikiName' for $dn");
#writeDebug("found explicit wikiName '$wikiName' for $loginName");
} else {

# 0. get previously used wikiName
my $refreshMode = $this->{_refreshMode} || 0;
my $prevWikiName = ($refreshMode < 2) ? $this->getWikiNameOfDn($dn) : '';
my $prevWikiName = ($refreshMode < 2) ? $this->getWikiNameOfLogin($loginName) : '';

# keep a wikiName once it has been computed
if ($prevWikiName) {
writeDebug("found prevWikiName=$prevWikiName for $dn");
writeDebug("found prevWikiName=$prevWikiName for $loginName");
$wikiName = $prevWikiName;
} else {

Expand Down Expand Up @@ -1417,7 +1417,7 @@ sub cacheUserFromEntry {
}

# 6. check for name clashes within this transaction
my $clashLogin = $this->getDnOfWikiName($wikiName, $data);
my $clashLogin = $this->getLoginOfWikiName($wikiName, $data);
if (defined $clashLogin) {
if ($loginName ne $clashLogin) {
writeWarning("$loginName clashes with $clashLogin on wikiName $wikiName at $dn ... renaming later");
Expand Down

0 comments on commit 0fc7aea

Please sign in to comment.