[Checkins] SVN: z3c.layer.pagelet/branches/icemac_login_support/src/z3c/layer/pagelet/ registering a default unauthenticatedPrincipal automagically sets the default principal of the global authentication utility, so we can use the principal id here
Michael Howitz
mh at gocept.com
Tue Mar 3 15:52:54 EST 2009
Log message for revision 97461:
registering a default unauthenticatedPrincipal automagically sets the default principal of the global authentication utility, so we can use the principal id here
Changed:
U z3c.layer.pagelet/branches/icemac_login_support/src/z3c/layer/pagelet/browser/auth.py
U z3c.layer.pagelet/branches/icemac_login_support/src/z3c/layer/pagelet/tests/ftesting.zcml
-=-
Modified: z3c.layer.pagelet/branches/icemac_login_support/src/z3c/layer/pagelet/browser/auth.py
===================================================================
--- z3c.layer.pagelet/branches/icemac_login_support/src/z3c/layer/pagelet/browser/auth.py 2009-03-03 20:43:41 UTC (rev 97460)
+++ z3c.layer.pagelet/branches/icemac_login_support/src/z3c/layer/pagelet/browser/auth.py 2009-03-03 20:52:53 UTC (rev 97461)
@@ -118,8 +118,7 @@
auth = zope.component.getUtility(
zope.app.security.interfaces.IAuthentication)
auth.unauthorized(
- #self.request.principal.id, self.request)
- None, self.request) # XXX correct this way?
+ self.request.principal.id, self.request)
return render_pagelet(self, self.request, 'login_failed.html')
else:
if nextURL is None:
Modified: z3c.layer.pagelet/branches/icemac_login_support/src/z3c/layer/pagelet/tests/ftesting.zcml
===================================================================
--- z3c.layer.pagelet/branches/icemac_login_support/src/z3c/layer/pagelet/tests/ftesting.zcml 2009-03-03 20:43:41 UTC (rev 97460)
+++ z3c.layer.pagelet/branches/icemac_login_support/src/z3c/layer/pagelet/tests/ftesting.zcml 2009-03-03 20:52:53 UTC (rev 97461)
@@ -158,6 +158,27 @@
component="zope.securitypolicy.zopepolicy.ZopeSecurityPolicy"
/>
+ <!-- default principals -->
+ <unauthenticatedPrincipal
+ id="zope.anybody"
+ title="Unauthenticated User" />
+
+ <unauthenticatedGroup
+ id="zope.Anybody"
+ title="Unauthenticated Users"
+ />
+
+ <authenticatedGroup
+ id="zope.Authenticated"
+ title="Authenticated Users"
+ />
+
+ <everybodyGroup
+ id="zope.Everybody"
+ title="All Users"
+ />
+
+ <!-- default users -->
<role
id="zope.Manager"
title="Manager"
More information about the Checkins
mailing list