From 9b637142c662a7effb51165c2d3d9bd9bf0cc40c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com>
Date: Wed, 5 Apr 2006 12:56:46 +0000
Subject: [PATCH] invalid the cache when setting reference on a person
 otherwise ERP5Security is not up to date

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6469 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/Person.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/product/ERP5/Document/Person.py b/product/ERP5/Document/Person.py
index 863270c222..f45f1a0db3 100644
--- a/product/ERP5/Document/Person.py
+++ b/product/ERP5/Document/Person.py
@@ -35,6 +35,7 @@ from Products.ERP5.Document.Entity import Entity
 from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
 from Products.ERP5Type.Utils import assertAttributePortalType
 from Products.ERP5Type.XMLObject import XMLObject
+from Products.ERP5Type.Cache import clearCache
 
 try:
   from Products import PluggableAuthService
@@ -174,6 +175,8 @@ class Person(Entity, Node, XMLObject):
               break
       self._setReference(value)
       self.reindexObject()
+      # invalid the cache for ERP5Security      
+      clearCache()
     
     security.declareProtected(Permissions.SetOwnPassword, 'setPassword')
     def setPassword(self, value) :
-- 
2.30.9