[Checkins] SVN: z3c.authenticator/branches/roger-0.6.0/ apply special group bugfix to 0.6.0 release
Roger Ineichen
roger at projekt01.ch
Tue Aug 18 19:11:20 EDT 2009
Log message for revision 102927:
apply special group bugfix to 0.6.0 release
Changed:
U z3c.authenticator/branches/roger-0.6.0/CHANGES.txt
U z3c.authenticator/branches/roger-0.6.0/setup.py
U z3c.authenticator/branches/roger-0.6.0/src/z3c/authenticator/group.py
U z3c.authenticator/branches/roger-0.6.0/src/z3c/authenticator/group.txt
-=-
Modified: z3c.authenticator/branches/roger-0.6.0/CHANGES.txt
===================================================================
--- z3c.authenticator/branches/roger-0.6.0/CHANGES.txt 2009-08-18 23:11:00 UTC (rev 102926)
+++ z3c.authenticator/branches/roger-0.6.0/CHANGES.txt 2009-08-18 23:11:19 UTC (rev 102927)
@@ -2,10 +2,19 @@
CHANGES
=======
+0.6.1 (2009-08-19)
+------------------
-Version 0.6.0 (2009-01-04)
---------------------------
+- Bugfix: the method specialGroups applied groups everytime the method get
+ called even if the group was already applied. This is a problem if the
+ global shared unauthenticated principal instance is used because it will
+ apply similar groups till the server get restarted and a new principal
+ instance is used.
+
+0.6.0 (2009-01-04)
+------------------
+
- Feature: added support for local IUnauthenticatedPrincipal. This is usefull
if you need to apply local roles to IUnauthenticatedPrincipal. This was not
possible before and is not possible in zope.app.authentication
@@ -45,13 +54,13 @@
- Added documentation for Pypi home page.
-Version 0.5.1 (2008-04-16)
---------------------------
+0.5.1 (2008-04-16)
+------------------
- Cleanup imports and adjust dependencies
-Version 0.5.0 (2008-04-16)
---------------------------
+0.5.0 (2008-04-16)
+------------------
- Initial Release
Modified: z3c.authenticator/branches/roger-0.6.0/setup.py
===================================================================
--- z3c.authenticator/branches/roger-0.6.0/setup.py 2009-08-18 23:11:00 UTC (rev 102926)
+++ z3c.authenticator/branches/roger-0.6.0/setup.py 2009-08-18 23:11:19 UTC (rev 102927)
@@ -23,7 +23,7 @@
setup (
name='z3c.authenticator',
- version='0.6.0',
+ version='0.6.1',
author = "Roger Ineichen and the Zope Community",
author_email = "zope-dev at zope.org",
description = "IAuthentication implementation for for Zope3",
Modified: z3c.authenticator/branches/roger-0.6.0/src/z3c/authenticator/group.py
===================================================================
--- z3c.authenticator/branches/roger-0.6.0/src/z3c/authenticator/group.py 2009-08-18 23:11:00 UTC (rev 102926)
+++ z3c.authenticator/branches/roger-0.6.0/src/z3c/authenticator/group.py 2009-08-18 23:11:19 UTC (rev 102927)
@@ -250,18 +250,21 @@
# global utility registered by everybodyGroup directive
everyone = zope.component.queryUtility(IEveryoneGroup)
- if everyone is not None and everyone.id != principal.id:
+ if everyone is not None and everyone.id != principal.id and \
+ everyone.id not in principal.groups:
principal.groups.append(everyone.id)
if IUnauthenticatedPrincipal.providedBy(principal):
# global utility registered by unauthenticatedGroup directive
unAuthGroup = zope.component.queryUtility(IUnauthenticatedGroup)
- if unAuthGroup is not None and unAuthGroup.id != principal.id:
+ if unAuthGroup is not None and unAuthGroup.id != principal.id and \
+ unAuthGroup.id not in principal.groups:
principal.groups.append(unAuthGroup.id)
else:
# global utility registered by authenticatedGroup directive
authGroup = zope.component.queryUtility(IAuthenticatedGroup)
- if authGroup is not None and authGroup.id != principal.id:
+ if authGroup is not None and authGroup.id != principal.id and \
+ authGroup.id not in principal.groups:
principal.groups.append(authGroup.id)
Modified: z3c.authenticator/branches/roger-0.6.0/src/z3c/authenticator/group.txt
===================================================================
--- z3c.authenticator/branches/roger-0.6.0/src/z3c/authenticator/group.txt 2009-08-18 23:11:00 UTC (rev 102926)
+++ z3c.authenticator/branches/roger-0.6.0/src/z3c/authenticator/group.txt 2009-08-18 23:11:19 UTC (rev 102927)
@@ -477,7 +477,15 @@
>>> found.groups
[u'groups.all', u'groups.authenticated']
+It is important that we do not apply a group twice since the
+UnauthenticatedPrincipal is a single instance in the securitypolicy. This issue
+is fixed in version 0.6.1 and 0.7.1
+ >>> specialGroups(event)
+ >>> found.groups
+ [u'groups.all', u'groups.authenticated']
+
+
allGroups
---------
More information about the Checkins
mailing list