You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2014/07/25 13:09:24 UTC
[14/16] git commit: [#7524] ticket:620 Log password reset and account
disabling
[#7524] ticket:620 Log password reset and account disabling
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/49464925
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/49464925
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/49464925
Branch: refs/heads/je/42cc_7524
Commit: 49464925f8e97001c8a1b4fd2aa776aafcb9b57b
Parents: 9a1c397
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri Jul 25 12:02:58 2014 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Fri Jul 25 12:02:58 2014 +0300
----------------------------------------------------------------------
Allura/allura/controllers/auth.py | 1 +
Allura/allura/lib/plugin.py | 4 ++++
2 files changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/49464925/Allura/allura/controllers/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py
index e7ce473..666e143 100644
--- a/Allura/allura/controllers/auth.py
+++ b/Allura/allura/controllers/auth.py
@@ -370,6 +370,7 @@ class AuthController(BaseController):
flash('Password changed')
del session['pwd-expired']
session.save()
+ M.AuditLog.log_user('Password reset (via expiration process)')
if return_to and return_to != request.url:
redirect(return_to)
else:
http://git-wip-us.apache.org/repos/asf/allura/blob/49464925/Allura/allura/lib/plugin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index a5c3f65..59949ce 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -141,6 +141,8 @@ class AuthenticationProvider(object):
self.session['userid'] = user._id
if self.is_password_expired(user):
self.session['pwd-expired'] = True
+ from allura.model import AuditLog
+ AuditLog.log_user('Password expired', user=user)
self.session.save()
g.zarkov_event('login', user=user)
g.statsUpdater.addUserLogin(user)
@@ -297,6 +299,8 @@ class LocalAuthenticationProvider(AuthenticationProvider):
def disable_user(self, user):
user.disabled = True
session(user).flush(user)
+ from allura.model import AuditLog
+ AuditLog.log_user('Account disabled', user=user)
def validate_password(self, user, password):
return self._validate_password(user, password)