[Zope3-checkins] [Checkins] SVN:z3c.layer.pagelet/branches/icemac_login_support/src/z3c/layer/pagelet/README.txtfixed test: when the unauthenticatedPrincipal is defined inZCML (see ftesting.zcml) 401 unauthorized is returned insteadof 403 forbidde

Roger Ineichen dev at projekt01.ch
Thu Mar 5 14:30:04 EST 2009


Hi Stephan

> Betreff: Re: AW: [Zope3-checkins] [Checkins] 
> SVN:z3c.layer.pagelet/branches/icemac_login_support/src/z3c/la
> yer/pagelet/README.txtfixed test: when the 
> unauthenticatedPrincipal is defined inZCML (see 
> ftesting.zcml) 401 unauthorized is returned insteadof 403 forbidde
> 
> On Thursday 05 March 2009, Roger Ineichen wrote:
> > Anyway,
> > anything described above has nothing to do with the test.
> > As far as I see, the forbidden.html page is a stub page raising 
> > Unauthorized for any case. Why do you except a
> > 403 Forbidden?
> 
> because the view is called forbidden.html. :-)

eeek,
it must be very late when I addeed this in ftesting.zcml ;-)

class UnauthorizedPage(BrowserPage):
    """Raise Unauthorized."""

    def __call__(self):
        raise Unauthorized('not authorized')

<browser:page
    for="*"
    name="forbidden.html"
    permission="zope.View"
    layer="z3c.layer.pagelet.IPageletBrowserLayer"
    class=".UnauthorizedPage"
    />


The test setup needs probably a review ;-)

Regards
Roger Ineichen
_____________________________
END OF MESSAGE

> Regards,
> Stephan
> --
> Stephan Richter
> Web Software Design, Development and Training Google me. 
> "Zope Stephan Richter"
> 



More information about the Zope3-Checkins mailing list