I'm a TWiki newbie, but the following seems like a bug, either in
CommentPlugin, or in some core functions called by
CommentPlugin.
I installed 4.1.2 a few weeks ago. And I have overridden
TWikiUserMapping.pm with my own version, so it's quite possible that has aggravated things. Yet the core edit/save/group/user stuff seems to work for me.
The overall problem is I can edit a page normally, but cannot add a comment to it. I'm denied access for comments, even though I'm in the
TWikiAdminGroup.
In Comment.pm, in save(), the wikiUserName is obtained:
my $wikiUserName = TWiki::Func::getWikiUserName();
and then fed to TWiki::Func::checkAccessPermission() to check permissions.
But getWikiUserName() returns 'Main.bobg' as opposed to my login or wikiName 'bobg', and the presence of 'Main.' messes up the authorization check.
Should Comment.pm use: my $wikiUserName = TWiki::Func::getWikiName();
(That does fix the problem.) Or should checkAccessPermission() be smart enough to ignore the 'Main.' prefix ? In which case, this bug should be fixed elsewhere.
--
TWiki:Main/BobGoldstein
- 20 Jul 2007
A bit of both, probably. Either way, this needs to be fixed for 4.2 with the new user mappers, so raising to Urgent.
CC
Done, thanks Bob!
CC