Re: [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" <[email protected]>
Newsgroups gmane.comp.web.zope.zope3.cvs
Message-ID <200903052026146.SM01252__12183.2432960675$1236281542$gmane$org@mobile05>
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"
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.