Item2171: Func::checkAccessPermission seems to act weird (imo) when being asked about webs that don't exist, or _default..

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Engine
Component:
Branches:
Reported By: SvenDowideit
Waiting For:
Last Change By: CrawfordCurrie
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

ItemTemplate edit

Summary Func::checkAccessPermission seems to act weird (imo) when being asked about webs that don't exist, or _default..
ReportedBy SvenDowideit
Codebase
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Engine
Component
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:f255544f28cf distro:072972fd0b86
TargetRelease n/a
ReleasedIn
Topic revision: r3 - 14 Dec 2009, CrawfordCurrie
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