diff rhodecode/model/user.py @ 686:ff6a8196ebfe beta

fixed anonymous access bug.
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 13 Nov 2010 02:50:32 +0100
parents dd532af216d9
children ecc566f8b69f
line wrap: on
line diff
--- a/rhodecode/model/user.py	Sat Nov 13 02:39:03 2010 +0100
+++ b/rhodecode/model/user.py	Sat Nov 13 02:50:32 2010 +0100
@@ -151,6 +151,11 @@
         present in database
         :param user:
         """
+
+        if not hasattr(user, 'user_id') or user.user_id is None:
+            raise Exception('passed in user has to have the user_id attribute')
+
+
         log.debug('filling auth user data')
         try:
             dbuser = self.get(user.user_id)