Show More
@@ -209,8 +209,6 b' def get_user(session):' | |||
|
209 | 209 | :param session: |
|
210 | 210 | """ |
|
211 | 211 | user = session.get('rhodecode_user', AuthUser()) |
|
212 | ||
|
213 | ||
|
214 | 212 | #if the user is not logged in we check for anonymous access |
|
215 | 213 | #if user is logged and it's a default user check if we still have anonymous |
|
216 | 214 | #access enabled |
@@ -219,6 +217,7 b' def get_user(session):' | |||
|
219 | 217 | if anonymous_user.active is True: |
|
220 | 218 | #then we set this user is logged in |
|
221 | 219 | user.is_authenticated = True |
|
220 | user.user_id = anonymous_user.user_id | |
|
222 | 221 | else: |
|
223 | 222 | user.is_authenticated = False |
|
224 | 223 |
@@ -151,6 +151,11 b' class UserModel(object):' | |||
|
151 | 151 | present in database |
|
152 | 152 | :param user: |
|
153 | 153 | """ |
|
154 | ||
|
155 | if not hasattr(user, 'user_id') or user.user_id is None: | |
|
156 | raise Exception('passed in user has to have the user_id attribute') | |
|
157 | ||
|
158 | ||
|
154 | 159 | log.debug('filling auth user data') |
|
155 | 160 | try: |
|
156 | 161 | dbuser = self.get(user.user_id) |
General Comments 0
You need to be logged in to leave comments.
Login now