# HG changeset patch # User Thierry Florac # Date 1426604569 -3600 # Node ID 7ed8fb9b132c41555ff1905429c373f964a82f59 # Parent 3762a2d034325aeb7b8d9a00672d13fa007bfc77 Changed checks when inheriting permissions from parent diff -r 3762a2d03432 -r 7ed8fb9b132c src/pyams_security/security.py --- a/src/pyams_security/security.py Wed Mar 11 12:14:35 2015 +0100 +++ b/src/pyams_security/security.py Tue Mar 17 16:02:49 2015 +0100 @@ -54,7 +54,7 @@ permission = self._everyone_permission if permission is None and self.inherit_parent_security: for parent in lineage(self): - if parent is self: + if parent in (self, self.__parent__): continue protection = IProtectedObject(parent, None) if protection is not None: @@ -72,7 +72,7 @@ permission = self._authenticated_permission if permission is None and self.inherit_parent_security: for parent in lineage(self): - if parent is self: + if parent in (self, self.__parent__): continue protection = IProtectedObject(parent, None) if protection is not None: