Item2171: Func::checkAccessPermission seems to act weird (imo) when being asked about webs that don't exist, or _default..
Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Engine
Component:
Branches:
see the commented out unit tests i commited..
#next _default, which we shouldn't be able to view to
#TODO: the commented out ones don't work quite the way SvenDowideit expected.
# $access =
# Foswiki::Func::checkAccessPermission( 'VIEW',
# $Foswiki::cfg{DefaultUserWikiName},
# '', 'NoSuchTopicPleaseDontMakeIt', '_default' );
# $this->assert( !$access );
$access =
Foswiki::Func::checkAccessPermission( 'CHANGE',
$Foswiki::cfg{DefaultUserWikiName},
'', 'NoSuchTopicPleaseDontMakeIt', '_default' );
$this->assert( !$access );
# $access =
# Foswiki::Func::checkAccessPermission( 'DONTTHINGTHEREISSUCHAPERM',
# $Foswiki::cfg{DefaultUserWikiName},
# '', 'NoSuchTopicPleaseDontMakeIt', '_default' );
# $this->assert( !$access );
#next NonExistantWeb, which doesn't exist
# $access =
# Foswiki::Func::checkAccessPermission( 'VIEW',
# $Foswiki::cfg{DefaultUserWikiName},
# '', 'NoSuchTopicPleaseDontMakeIt', 'NonExistantWeb' );
# $this->assert( !$access );
# $access =
# Foswiki::Func::checkAccessPermission( 'CHANGE',
# $Foswiki::cfg{DefaultUserWikiName},
# '', 'NoSuchTopicPleaseDontMakeIt', 'NonExistantWeb' );
# $this->assert( !$access );
# $access =
# Foswiki::Func::checkAccessPermission( 'DONTTHINGTHEREISSUCHAPERM',
# $Foswiki::cfg{DefaultUserWikiName},
# '', 'NoSuchTopicPleaseDontMakeIt', 'NonExistantWeb' );
# $this->assert( !$access );
--
SvenDowideit - 28 Sep 2009
I corrected and commented the tests, with an explanation (I hope) of why they are that way.
--
CrawfordCurrie - 14 Dec 2009