fixed Issue 1530:Impersonation events not recorded if redirections onaccept, thanks kmouts
This commit is contained in:
2
VERSION
2
VERSION
@@ -1 +1 @@
|
||||
Version 2.5.1-stable+timestamp.2013.06.16.06.51.32
|
||||
Version 2.5.1-stable+timestamp.2013.06.16.06.56.07
|
||||
|
||||
@@ -2919,14 +2919,14 @@ class Auth(object):
|
||||
table_user._filter_fields(user, True))
|
||||
self.user = auth.user
|
||||
onaccept = self.settings.login_onaccept
|
||||
log = self.messages.impersonate_log
|
||||
self.log_event(log, dict(id=current_id, other_id=auth.user.id))
|
||||
if onaccept:
|
||||
form = Storage(dict(vars=self.user))
|
||||
if not isinstance(onaccept,(list, tuple)):
|
||||
onaccept = [onaccept]
|
||||
for callback in onaccept:
|
||||
callback(form)
|
||||
log = self.messages.impersonate_log
|
||||
self.log_event(log, dict(id=current_id, other_id=auth.user.id))
|
||||
elif user_id in (0, '0'):
|
||||
if self.is_impersonating():
|
||||
session.clear()
|
||||
|
||||
Reference in New Issue
Block a user