fixed auth.impersonating again, thanks Ricardo
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.1.1 (2012-10-16 10:54:30) dev
|
Version 2.1.1 (2012-10-16 11:08:39) dev
|
||||||
|
|||||||
+5
-4
@@ -2746,10 +2746,11 @@ class Auth(object):
|
|||||||
callback(form)
|
callback(form)
|
||||||
log = self.messages.impersonate_log
|
log = self.messages.impersonate_log
|
||||||
self.log_event(log,dict(id=current_id, other_id=auth.user.id))
|
self.log_event(log,dict(id=current_id, other_id=auth.user.id))
|
||||||
elif user_id in (0, '0') and self.is_impersonating():
|
elif user_id in (0, '0'):
|
||||||
session.clear()
|
if self.is_impersonating():
|
||||||
session.update(cPickle.loads(auth.impersonator))
|
session.clear()
|
||||||
self.user = session.auth.user
|
session.update(cPickle.loads(auth.impersonator))
|
||||||
|
self.user = session.auth.user
|
||||||
return None
|
return None
|
||||||
if requested_id is DEFAULT and not request.post_vars:
|
if requested_id is DEFAULT and not request.post_vars:
|
||||||
return SQLFORM.factory(Field('user_id', 'integer'))
|
return SQLFORM.factory(Field('user_id', 'integer'))
|
||||||
|
|||||||
Reference in New Issue
Block a user