Mercurial > kallithea
comparison rhodecode/model/user.py @ 673:dd532af216d9 beta
#49 Enabled anonymous access for web interface controllable from permissions pannel
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 11 Nov 2010 01:05:43 +0100 |
parents | 7e536d1af60d |
children | ff6a8196ebfe |
comparison
equal
deleted
inserted
replaced
670:e7c670cc03cb | 673:dd532af216d9 |
---|---|
141 raise | 141 raise |
142 | 142 |
143 def reset_password(self, data): | 143 def reset_password(self, data): |
144 from rhodecode.lib.celerylib import tasks, run_task | 144 from rhodecode.lib.celerylib import tasks, run_task |
145 run_task(tasks.reset_user_password, data['email']) | 145 run_task(tasks.reset_user_password, data['email']) |
146 | |
147 | |
148 def fill_data(self, user): | |
149 """ | |
150 Fills user data with those from database and log out user if not | |
151 present in database | |
152 :param user: | |
153 """ | |
154 log.debug('filling auth user data') | |
155 try: | |
156 dbuser = self.get(user.user_id) | |
157 user.username = dbuser.username | |
158 user.is_admin = dbuser.admin | |
159 user.name = dbuser.name | |
160 user.lastname = dbuser.lastname | |
161 user.email = dbuser.email | |
162 except: | |
163 log.error(traceback.format_exc()) | |
164 user.is_authenticated = False | |
165 | |
166 return user |