Skip to content

Commit

Permalink
Item10906: Checking other than USERSWEB ??
Browse files Browse the repository at this point in the history
If a username is entered into a group in a way that might cause it to be
interpreted as a Web.Topic name,  TopicUserMapper ends up with a bogus
webname when doing auth checking.  For the TopicUserMapping contrib,
user topics can't be anywhere but in the Users web - so force that name
in as the web name.

git-svn-id: http://svn.foswiki.org/trunk@12030 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Jun 21, 2011
1 parent 3dfecc5 commit 6e41729
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions TopicUserMappingContrib/lib/Foswiki/Users/TopicUserMapping.pm
Expand Up @@ -760,6 +760,9 @@ sub groupAllowsView {
$this->{session}
->normalizeWebTopicName( $Foswiki::cfg{UsersWebName}, $Group );

# If a Group or User topic normalized somewhere else, doesn't make sense, so ignore the Webname
$groupWeb = $Foswiki::cfg{UsersWebName};

$groupName = undef
if ( not $this->{session}->topicExists( $groupWeb, $groupName ) );

Expand Down Expand Up @@ -791,6 +794,9 @@ sub groupAllowsChange {
$this->{session}
->normalizeWebTopicName( $Foswiki::cfg{UsersWebName}, $Group );

# If a Group or User topic normalized somewhere else, doesn't make sense, so ignore the Webname
$groupWeb = $Foswiki::cfg{UsersWebName};

$groupName = undef
if ( not $this->{session}->topicExists( $groupWeb, $groupName ) );

Expand Down

0 comments on commit 6e41729

Please sign in to comment.