fixed issue 1208 (auth on GAE) by disabling virtual fields in auth.user on GAE

This commit is contained in:
mdipierro
2012-12-08 18:25:04 -06:00
parent 353a66f44c
commit 676b2ef54b
2 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.3.0 (2012-12-07 10:57:44) rc1
Version 2.3.0 (2012-12-08 18:24:15) rc1
+8 -4
View File
@@ -1763,10 +1763,14 @@ class Auth(object):
"""
login the user = db.auth_user(id)
"""
user = Storage(user)
for key,value in user.items():
if callable(value) or key=='password':
del user[key]
from gluon.settings import global_settings
if global_settings.web2py_runtime_gae:
user = Row(self.db.auth_user._filter_fields(user, id=True))
else:
user = Row(user)
for key,value in user.items():
if callable(value) or key=='password':
delattr(user,key)
current.session.auth = Storage(
user = user,
last_visit=current.request.now,