You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2012/10/31 15:49:31 UTC
[1/2] git commit: [#5009] record an audit log for trove additions
that come via AJAX too
Updated Branches:
refs/heads/master d7602b30b -> beeb0e736
[#5009] record an audit log for trove additions that come via AJAX too
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/762583e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/762583e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/762583e3
Branch: refs/heads/master
Commit: 762583e32e6423576146b756bdf2ae22004d904a
Parents: d7602b3
Author: Dave Brondsema <db...@geek.net>
Authored: Tue Oct 30 21:08:21 2012 +0000
Committer: Cory Johns <jo...@geek.net>
Committed: Wed Oct 31 14:48:09 2012 +0000
----------------------------------------------------------------------
Allura/allura/ext/admin/admin_main.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/762583e3/Allura/allura/ext/admin/admin_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/admin_main.py b/Allura/allura/ext/admin/admin_main.py
index 807f20d..0810e8e 100644
--- a/Allura/allura/ext/admin/admin_main.py
+++ b/Allura/allura/ext/admin/admin_main.py
@@ -361,6 +361,7 @@ class ProjectAdminController(BaseController):
elif trove_obj is not None:
if trove_obj._id not in current_troves:
current_troves.append(trove_obj._id)
+ M.AuditLog.log('add trove %s: %s', type, trove_obj.fullpath)
g.post_event('project_updated')
else:
error_msg = 'This category has already been assigned to the project.'
@@ -372,14 +373,12 @@ class ProjectAdminController(BaseController):
require_access(c.project, 'update')
trove_obj, error_msg = self._add_trove(type, new_trove)
return dict(trove_full_path = trove_obj.fullpath, trove_cat_id = trove_obj.trove_cat_id, error_msg=error_msg)
- redirect('trove')
@expose()
@require_post()
def add_trove(self, type, new_trove, **kw):
require_access(c.project, 'update')
trove_obj, error_msg = self._add_trove(type, new_trove)
- M.AuditLog.log('add trove %s: %s', type, trove_obj.fullpath)
if error_msg:
flash(error_msg,'error')
redirect('trove')