You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by gc...@apache.org on 2022/08/19 21:03:31 UTC

[allura] 04/08: [#8451] record tool renames in audit log

This is an automated email from the ASF dual-hosted git repository.

gcruz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 35b995e9e2688a21804fdeba7c533ab1af96ed35
Author: Dillon Walls <di...@slashdotmedia.com>
AuthorDate: Fri Aug 5 21:03:18 2022 +0000

    [#8451] record tool renames in audit log
---
 Allura/allura/app.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Allura/allura/app.py b/Allura/allura/app.py
index 16989d251..49145ab2e 100644
--- a/Allura/allura/app.py
+++ b/Allura/allura/app.py
@@ -944,7 +944,12 @@ class DefaultAdminController(BaseController, AdminControllerMixin):
 
         """
         require_access(self.app, 'configure')
+        old_label = self.app.config.options['mount_label']
         self.app.config.options['mount_label'] = mount_label
+        model.AuditLog.log('updated label: "{}" => "{}" for {}'.format(
+            old_label,
+            mount_label,
+            self.app.config.options['mount_point']))
         g.post_event('project_menu_updated')
         redirect(six.ensure_text(request.referer or '/'))