From 85643ae55e96bba525a10dd2d719bc1142b58931 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 17 Jun 2013 08:05:02 -0500 Subject: [PATCH] fixed Issue 1539:user_groups are not updated during and after impersonation, thanks kmouts --- VERSION | 2 +- gluon/tools.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 96c23184..3a65c5c2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.5.1-stable+timestamp.2013.06.17.04.40.23 +Version 2.5.1-stable+timestamp.2013.06.17.08.04.19 diff --git a/gluon/tools.py b/gluon/tools.py index 844c7a0d..12cd090e 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -2924,6 +2924,7 @@ class Auth(object): auth.user.update( table_user._filter_fields(user, True)) self.user = auth.user + self.update_groups() onaccept = self.settings.login_onaccept log = self.messages.impersonate_log self.log_event(log, dict(id=current_id, other_id=auth.user.id)) @@ -2938,6 +2939,7 @@ class Auth(object): session.clear() session.update(cPickle.loads(auth.impersonator)) self.user = session.auth.user + self.update_groups() return None if requested_id is DEFAULT and not request.post_vars: return SQLFORM.factory(Field('user_id', 'integer'))