diff rhodecode/controllers/changeset.py @ 2375:bc2d8c03c050 beta

Implemented #467 Journal logs comments on changesets - added created/updated user action to journal - added created/updated users group action journal - added ip adresses to most of action_log calls to track IP changes - rewrote action_parser to simpler and more efficient solution
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 03 Jun 2012 00:40:14 +0200
parents 5143b8df576c
children 91fae60bf2b6
line wrap: on
line diff
--- a/rhodecode/controllers/changeset.py	Sun Jun 03 00:37:12 2012 +0200
+++ b/rhodecode/controllers/changeset.py	Sun Jun 03 00:40:14 2012 +0200
@@ -40,7 +40,7 @@
 import rhodecode.lib.helpers as h
 from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 from rhodecode.lib.base import BaseRepoController, render
-from rhodecode.lib.utils import EmptyChangeset
+from rhodecode.lib.utils import EmptyChangeset, action_logger
 from rhodecode.lib.compat import OrderedDict
 from rhodecode.lib import diffs
 from rhodecode.model.db import ChangesetComment
@@ -373,7 +373,12 @@
             f_path=request.POST.get('f_path'),
             line_no=request.POST.get('line')
         )
+        action_logger(self.rhodecode_user,
+                      'user_commented_revision:%s' % revision,
+                      c.rhodecode_db_repo, self.ip_addr, self.sa)
+
         Session.commit()
+
         if not request.environ.get('HTTP_X_PARTIAL_XHR'):
             return redirect(h.url('changeset_home', repo_name=repo_name,
                                   revision=revision))