incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [2/2] git commit: [#5009] record an audit log for trove additions that come via AJAX too
Date Tue, 30 Oct 2012 21:17:26 GMT
[#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/88a9a6d7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/88a9a6d7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/88a9a6d7

Branch: refs/heads/db/5009
Commit: 88a9a6d7e509a53de9d8ad8f65b2905d76f912cf
Parents: f0a6bdb
Author: Dave Brondsema <dbrondsema@geek.net>
Authored: Tue Oct 30 21:08:21 2012 +0000
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Tue Oct 30 21:08:21 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/88a9a6d7/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')


Mime
View raw message