[entities] fix CWUser.is_in_group implementation stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 28 Jan 2010 09:49:50 +0100
branchstable
changeset 4402 360c532070f5
parent 4398 4e7e74918631
child 4403 53f5d52085b4
[entities] fix CWUser.is_in_group implementation use self.groups property instead of self._groups which might not be initialized.
entities/authobjs.py
--- a/entities/authobjs.py	Wed Jan 27 11:26:57 2010 +0100
+++ b/entities/authobjs.py	Thu Jan 28 09:49:50 2010 +0100
@@ -82,7 +82,7 @@
     def is_in_group(self, group):
         """convience / shortcut method to test if the user belongs to `group`
         """
-        return group in self._groups
+        return group in self.groups
 
     def is_anonymous(self):
         """ checks if user is an anonymous user"""