aboutsummaryrefslogtreecommitdiff
path: root/rhodecode/model/user.py
diff options
context:
space:
mode:
authorMarcin Kuzminski <marcin@python-works.com>2010-11-13 02:50:32 +0100
committerMarcin Kuzminski <marcin@python-works.com>2010-11-13 02:50:32 +0100
commit5d0f85b899e5702cc05832473f415565f325f742 (patch)
treeb5dde2b1a14515b90f15910ada469ec97cc5d058 /rhodecode/model/user.py
parent208aef5f688c55ee43ec79c1c8b1f8d4a4a59b57 (diff)
fixed anonymous access bug.
--HG-- branch : beta
Diffstat (limited to 'rhodecode/model/user.py')
-rw-r--r--rhodecode/model/user.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/rhodecode/model/user.py b/rhodecode/model/user.py
index fc6d57c2..2980aad8 100644
--- a/rhodecode/model/user.py
+++ b/rhodecode/model/user.py
@@ -151,6 +151,11 @@ class UserModel(object):
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)