{repository] add documentation explaining ``fix_user_classes`` hook
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 27 Feb 2012 13:00:36 +0100
changeset 8277 8b173e0a617f
parent 8276 57d8f3b3e165
child 8280 17c588eca3c2
{repository] add documentation explaining ``fix_user_classes`` hook
server/repository.py
--- a/server/repository.py	Mon Feb 27 12:47:24 2012 +0100
+++ b/server/repository.py	Mon Feb 27 13:00:36 2012 +0100
@@ -177,6 +177,9 @@
             self.init_cnxset_pool()
         @onevent('after-registry-reload', self)
         def fix_user_classes(self):
+            # After registery reload the 'CWUser' class used for CWEtype
+            # changed.  To any existing user object have a different class than
+            # the new loaded one. We are hot fixing this.
             usercls = self.vreg['etypes'].etype_class('CWUser')
             for session in self._sessions.values():
                 if not isinstance(session.user, InternalManager):